Hi all, I have a working glimmix model for repeated insect trapcatch by habitat treatment. Code was written with the help of a university statistician. They strongly suggested that I use glimmix but they do not use the dist=KEYWORD model option. They pre-transform for normality instead. I would like to utilize this feature of the PROC but all attempts to write the code comes up with non-convergence, starting values of MISQUE, or non-significance problems. Further down the road, I would like to add additional variables (specifically continuous ones), but I figured I ought fix this issue first. I have strong Excel skills but I am poor at SAS language and as a results I do things differently than I should. Further, I did not set up the experimental design and it was done very messy. I will try to explain as clearly as possible. The response is number of insects caught, Total_Earwigs. The experimental design has four random 'blocks' but there are two different varieties 'Cultivars' of the sampling unit (a tree). Cultivar 1 is in block 1 and 3, Cultivar 2 was planted in block 2 and 4. The researchers who set up the experiment assumed that the cultivar has no affect on any responses and I nested it into block. Each block has 6 plots of different treatments 'trt_name' (6 levelsx4reps). Each plot has 15 trees and a randomly chosen tree had a two traps attached to it. When I collected the data I had assumed that tree within plot has no affect on responses and am choosing to ignore it for now. 'Forder' is a dummy variable corresponding to treatment that I threw in there to sort by and have the treatments 'trt_name' be ordered a specific way in graph outputs (not alphabetical). 'Year' has four levels. I trapped weekly but recorded time with unique units degree days (time spent within a species-specific temperature range). 'DD_Mean' refers to degree days but given that it was a continuous variable, I transformed the data into 6 discreet categories and averaged among those. The model is below and I have follow-up questions below. proc import out=work.earwig dbms=tab replace datafile="&folder\&dataname"; getnames=yes; datarow=2; run; proc sort data=earwig; by block cultivar Forder Trt_Name Year DD_Mean; proc means data=earwig (where=(Orchard=1 and DD_Mean<1750)) noprint; by block cultivar Forder Trt_Name Year DD_Mean; var Total_Earwigs; output out= earwig_2 mean=Total_Earwigs; run; data earwig_2; set earwig_2; sqrt_ad = sqrt(Total_Earwigs); run; /* Fit model using means */ proc glimmix data= earwig_2 plots=(studentpanel boxplot(fixed random marginal conditional observed)); class block Cultivar Trt_Name Year DD_Mean; model sqrt_Ad = Trt_Name | Year | DD_Mean ; random intercept Trt_Name / subject=Block(Cultivar); random DD_Mean / subject= Trt_Name*Year*Block(Cultivar) type=ar(1) residual; lsmeans Trt_Name / diff adjust=tukey; lsmeans Trt_Name / pdiff lines; lsmeans DD_Mean; lsmeans Year; lsmeans Trt_Name*Year / plot=meanplot(join sliceby=Year cl) alpha=0.18 slice=Trt_Name; lsmeans Trt_Name*DD_Mean / plots=meanplot(join sliceby=DD_Mean cl) alpha=0.18; lsmeans Trt_Name*DD_Mean / plots=meanplot(join sliceby=Trt_Name cl) alpha=0.18; lsmeans DD_Mean*Year / plots=meanplot(join sliceby=Year cl) alpha=0.18 slice=DD_Mean; run; If I run the above model with transformed data, I get significant results. but If I change the glimmix statement to "model Total_Earwigs = Trt_Name | Year | DD_Mean / dist=nb ;" treatment is no longer significant. What am I missing here? Some other things I have tried unsuccessfully are: offset=, link=, ddfm= but I am over my head. At this point I am just proceeding by trial-n-error. =/ Also, am I correct to turn time (degree days) into discrete categories? What options are there to keep it continuous? This is the most simple version of my model and it already seams over-parameterized (if I am using that term correctly). The next step I would like to do is add the continuous variable 'vegetation' which is an index of habitat vegetation that was sampled at the site of insect trapping. It is a smaller data-set because I sampled insects much more frequently than vegetation. I have run the same model on the vegetation data using transformations and the results were highly significant. Of the six treatments, 2 yield very little vegetation, 2 medium, and 2 that are very high. The insect data responded similarly but was less significant in the analysis. A comparison is below. How would one address the effect of vegetation on abundance? Simple linear regression (plotting mean earwigs by mean vegetation per month) is a very mess graph. Thank you any and all for any and all help! I meet with my stats advisor again next week, I hope to present to her a working 'dist=Keyword' model. Cheers, Andrew
... View more