BookmarkSubscribeRSS Feed
Fengfeng
Calcite | Level 5

Hi!

I  want to use a poisson regression for my data with adjusting for spatial autocorrelation.

I have tried to do it by using GLIMMIX

proc glimmix data=sasdata.all;

nloptions maxiter=500;

model ABUND=logP logN/ dist=poisson link=log solution;

random _residual_/type=sp(exp)(lat_dd lon_dd) subject=intercept;

run;

There is a warning message: "Obtaining minimum variance quadratic unbiased estimates as starting values for the covariance parameters failed."

What should I try to make this work?

Thank you!

Feng Zhang

6 REPLIES 6
SteveDenham
Jade | Level 19

Without seeing the data, I can't be sure if this will even be helpful.  I note that you have subject=intercept in the random statement.  Unless there is a variable called "intercept" in sasdata.all, this error could occur.  Of course, if the variable weren't there, then there should be other error messages, and the proc would error out before the "Obtaining..." message ever showed.

So, I am very curious as to what the subject really is.  Suppose it is called locate (not that it is, but for examples sake only).  You might try:

random intercept/residual type=sp(exp)(lat_dd lon_dd) subject=locate;

which would give a random intercept model with a spatial correlation between the subjects.  You might also consider using different techniques for optimization.  The default is QUANEW, so you might examine NRRIDG or NEWRAP.  Another possibility is to include the INITGLM option in the proc glimmix statement.

But what I think is happening is that your data is such that there just isn't a feasible solution.  You may have to "creep up on" the proper covariance structure, starting with something remotely applicable that is simpler and describes things in an approximate manner.

Steve Denham

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

The subject=intercept option is OK. It is the MIXED and GLIMMIX convention to indicate that all the data are in one big subject, meaning that all observations can be correlated. You probably want to experiment with the PARMS statement, to explicitly give initial guess for the parameters.The procedure will use these instead of the ones it is trying, and failing, to obtain.

By using the RANDOM _RESIDUAL_, you are doing so-called R-side analyses, which means that you no longer have a true Poisson conditional distribution. The residual variance is being adjusted for overdispersion. You could try so-called G-side analysis:

proc glimmix data=sasdata.all;

nloptions maxiter=500;

class ID;

model ABUND=logP logN/ dist=poisson link=log solution;

random ID / type=sp(exp)(lat_dd lon_dd) subject=intercept;

run;

Note: You need an ID for each observation (a unique value for each), and make this a class variable. This model and code comes directly out of the great new book by Walter Stroup (Generalized Linear Mixed Models [CRC Press]). Interpretation is slightly different than R-side analyses (here, you have a true conditional Poisson distribution).

Fengfeng
Calcite | Level 5

Thank you for you your help. Actually I want to include over-dispersion factor into my model because the variance of the data is much bigger than the mean.

SteveDenham
Jade | Level 19

If the variance is greater than the mean, you may wish to consider type=negbin, to get a negative binomial distribution.

Steve Denham

SteveDenham
Jade | Level 19

/* Bangs head on desk */

has the best approach--switch to a G-side analysis.  GLIMMIX is becoming notorious in our shop for having convergence/starting problems when an R-side covariance is used for certain distributions.

But I still think you should consider a negative binomial.

Steve Denham

Fengfeng
Calcite | Level 5

Thank you for your help. I will try The G-side analysis with negative binomial.

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 ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 2614 views
  • 0 likes
  • 3 in conversation