BookmarkSubscribeRSS Feed
Ammonite | Level 13

Hi Folks:


I'm analyzing spatially correlated data and using proc countreg. My health outcome is the number infectious disease counts at each city. The covariates rate_c1, rate_c2 and rate_c3 are at city level (250 cities). And, two other covariates are at province level (17 provinces): rate_p1 and rate_p2. I thought having covariates at different municipal levels cause random error. Therefore, I defined groupid (PID which identifies each province) and errorcomp in the model as shown below. 


However, I get an error:


ERROR: Panel data models with spatial effects are not supported.


Am I using the correct SAS procedure when covariates are different levels and data has spatial auto-correlation?

Any pointers regarding the correct procedure to analyze a data with spatial effects with multi-level variables is greatly appreciated. 


proc countreg data=combined Wmat=Wmatrix groupid=PID;
   model n_outcome = rate_c1 rate_c2 rate_c3 rate_p1 rate_p2   
   / errorcomp=random dist=negbin offset=ln;
   spatialeffects rate1 rate3 rate4 rate_p1 rate_p2;



Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg



Back in the Classroom!

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

View all other training opportunities.

Discussion stats
  • 0 replies
  • 1 in conversation