BookmarkSubscribeRSS Feed
buski
Calcite | Level 5
Hi!
I conducted a case control study about the disease incidence and land cover types. The contro points were random sampled based on the population density.
How to adjust for the spatial autocorrelation in thr logistic model?
I have tried to do it by using GLIMMIX

PROC GLIMMIX data=test;
MODEL disease= grass200m
/ dist=binary solution oddsratio;
random _residual_ / type=sp(exp) (x_cor y_cor);
run;

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

How do I modify my code? Thanks a lot!
3 REPLIES 3
SteveDenham
Jade | Level 19
I think you will need a subject= specification in the random statement. Try:

PROC GLIMMIX data=test;
CLASS subjid;
MODEL disease= grass200m
/ dist=binary solution oddsratio;
random _residual_ / type=sp(exp) (x_cor y_cor) subject=subjid;
run;

Each subject should have its own set of x and y coordinates.

SteveDenham
Dale
Pyrite | Level 9

Yes, a subject specification is required.  If there are no subject blocks and all data should be regarded as a single subject, then specify subject=intercept.

buski
Calcite | Level 5

Thanks for your suggestion!

When I try the code below, it works.

However, the standard error of SP(SPH) was showed "." in the covariance parameter estimates.

The odds ratios do not change no matter I change the type of covariance to vc or cs. Is it correct?

The ID is the unique ID for case and control and the "x_cor" and "y_cor" are the coordinate information.

The geographic distribution of case and control points are very similar.

PROC GLIMMIX data=BROWN;

CLASS ID;

MODEL DISEASE= ode200m grass200m

EM1/ dist=binary solution oddsratio;

random _residual_ /subject=ID

type=sp(sph) (x_cor y_cor);

output out=abd pred=p resid=r;

RUN;

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
  • 3 replies
  • 2984 views
  • 1 like
  • 3 in conversation