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
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
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).
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.
If the variance is greater than the mean, you may wish to consider type=negbin, to get a negative binomial distribution.
Steve Denham
Thank you for your help. I will try The G-side analysis with negative binomial.
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.