BookmarkSubscribeRSS Feed
dfish44
Calcite | Level 5

Hi all –

I am experiencing difficulties using the “glimmix” procedure in analysis of aquatic macroinvertebrate catch rate data. This is my first time using this procedure and I am admittedly new to multilevel modeling. Despite the stacks of SAS and other multilevel modeling resources on my desk, I continue to struggle with identifying and executing the most appropriate analysis and would value the input of an experienced and more skilled SAS user.

As a brief overview, I am interested in modeling the influence of several continuous predictor variables (water, phyco, chloro, riff, run) on aquatic macroinvertebrate catch rates (cf). All variables were collected from 5 streams annually from 2000 to 2013. For the analysis, fixed effects include all continuous predictor variables and random effects include “stream.” I chose the glimmix procedure to estimate an overall (i.e., landscape-level) effect of each predictor variable while accounting for potential within- and among-stream variation. The code I am running is as follows:

data a;

input stream$ year cf water phyco chloro riff run;

if stream='fuller' then system=1;

if stream='mad' then system=2;

if stream='slick' then system=3;

if stream='rock' then system=4;

if stream='turtle' then system=5;

datalines;

fuller      2000  342   2.752798998 20.42 14.65 12.46 17.81

fuller      2001  220   2.752986064 21.33 11.91 15.36 21.37

fuller      2002  35    2.752845772 22.11 7.67  16.07 14.94

fuller      2003  120   2.752705434 17.03 9.48  13.53 14.71

fuller      2004  29    2.752588451 19.88 10.21 12.1  16.55

fuller      2005  83    2.752588451 21.33 8.97  15.87 20.57

fuller      2006  11    2.752775609 19.46 11.29 14.68 18.27

fuller      2007  8     2.753091254 17.44 14.21 17.14 21.84

fuller      2008  2     2.752993078 20.24 8.47  16.38 19.54

fuller      2009  11    2.753039831 20.51 9.98  15.15 19.65

fuller      2010  90    2.753002429 17.24 9.87  12.46 13.67

fuller      2011  488   2.75308658  20.35 8.22  17.56 18.85

fuller      2012  634   2.753014118 20.45 12.4  18.33 21.61

fuller      2013  201   2.752894879 19.88 6.73  15.63 16.21

mad   2000  9     2.689511873 20.42 14.65 12.46 19.88

mad   2001  8     2.689839901 21.33 11.91 15.31 21.04

mad   2002  0     2.69015779  22.11 7.67  18.96 17.35

mad   2003  0     2.689594298 17.03 9.48  16.31 16.78

mad   2004  1     2.689511873 19.88 10.21 10.67 17.47

mad   2005  0     2.689890513 21.33 8.97  12.26 22.64

.

.

.

.

.

turtle      2013  6     2.740831493 19.88 6.73  15.63 16.21

 

;

proc print; run;

 

proc sort data=a; by system;

run;

 

proc glimmix data=a method=quad;

class system;

model cf=water phyco / link=log solution dist=poisson;

random intercept/subject=system;

run;  

With this coding, I am running into several issues – most, if not all of which I’m sure stem from my unfamiliarity with this procedure. In examining the output window, I have what seems to be a truncated output with no fit statistics, covariance parameter estimates, or solutions for fixed effects. Under the heading for “Optimization Information,” it states that my fixed effects are not profiled and that “the function value of the objective function cannot be computed at the starting point.” Furthermore, in the log, I am getting an error stating that “QUANEW optimization cannot be completed.”

I suspect that these issues may have something to do with the repeated-measures aspect of my data structure (i.e., that observations within streams are not independent of one another), but I am not sure. An additional question would then be how to account for these repeated measures in the glimmix syntax. I apologize for asking the group for assistance with all of these issues at once. I am hoping that any and all comments or suggestions will act as a springboard to aid in my better understanding and appreciation of the glimmix procedure. Any suggestions would be very much appreciated.

Thank you,

dfish44

1 REPLY 1
sld
Rhodochrosite | Level 12 sld
Rhodochrosite | Level 12

Your code looks appropriate, so the problem lies in convergence (or lack thereof). I would start simple and build up.

 

  • Try a simple regression (i.e., one predictor) and drop the RANDOM statement. 
  • Try Laplace rather than quad.
  • Try the tips in this paper by Kiernan, Tao and Gibbs http://tinyurl.com/puka8l7 ; note in particular the recommendation for NRRIDG or NEWRAP methods for the Poisson distribution.

 

Hopefully some combination of tweaked options will give convergence. Then you can add on: random streams, additional predictors, etc.

 

Other comments:

  • "cf" is a count, not a rate. If the sampling effort is the same in all streams in all years, then analysis of the count is fine. But if effort (or some other metric that turns your count into a rate) differs, then you should ponder including an offset.
  • Does each predictor variable have a linear relationship with log(cf)? There could be an optimal range, and something like a quadratic model might work well enough.
  • Your current code would allow intercepts to vary among streams (aka, random intercepts). It would be nice to consider allowing slopes to vary among streams (aka, random slopes) but with only 13 years (i.e., 13 observations for each stream), there's only enough information for a single parameter estimate (so, only one predictor, entered linearly). Nice perhaps, but not too feasible.
  • Check for overdispersion.
  • Check for multicollinearity if you can build up to a multiple regression.
  • At some point in time, consider autocorrelation.

 

Good luck!

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 2976 views
  • 0 likes
  • 2 in conversation