BookmarkSubscribeRSS Feed
sweettravel
Calcite | Level 5
Hi, all

I have a question with regard to stand error output when using glimmix.

I am trying to run a model on how the No. of veterinarians are determined by animal stocks. Since I have both male vets and female vets for each county, and the explanatory variables are the same for them, I think they are correlated, so I am trying to run a bivariate poisson model here.

I use the R-side covariance structure is used to model the correlations. I find in the output, General Chi-square/DF is 1 if I use this regresion.

My code is like:
First I combine "male vet" and "female vet" into one variable "gender":
data gender2000;
length dist $7;
length class $7;
set sea2000;
gender =male;
class="male";
dist = "poisson";
output;
gender = female;
class = "female";
dist = "poisson";
output;
keep gender hog Cattle horse sheep dist class obs;
run;

Then I run glimmix:
proc glimmix data=gender2000;
nloptions maxiter = 100;
class obs class;
model gender = class class*hog class*cattle class*horse class*sheep/
noint s dist=byobs(dist);
random _residual_ / subject=obs type=chol;
run;

This is part of the output I get:


Solutions for Fixed Effects

Standard
Effect class Estimate Error DF t Value Pr > |t|


Hog*class female -1.43E-7 0 1387 -Infty <.0001
Hog*class male 3.888E-7 0 1387 Infty <.0001
cattle*class female 4.039E-7 0 1387 Infty <.0001
cattle*class male 1.507E-6 0 1387 Infty <.0001
Horse*class female 0.000032 9.712E-6 1387 3.33 0.0009
Horse*class male 0.000052 6.942E-6 1387 7.44 <.0001
Sheep*class female 2.83E-6 1.709E-6 1387 1.66 0.0980
Sheep*class male -2.98E-7 1.209E-6 1387 -0.25 0.8056

As you can see, several explanatory variables have standard error equal to 0. I have never encountered this problem before. As we always expect low standard error is a good sign, but with almost everything equal to 0 is weird here. Is it because my data? For example, I have the Mean for hog as 85603, with a standard deviation of 258881. I have total 1409 observations in the original data set.

I wonder whether anyone could provide an insight into my problem. Is there a way to correct it? Or is there some materials I can read to better understand the glimmix procedures, e.g, how this std. error is calculated? Thanks a lot!
5 REPLIES 5
Susan
Calcite | Level 5
It could be that you are in fact having numeric precision problems, as you suspect, given the large number of animals and what is probably a small number of vets. You could read up on numeric precision in SAS (you get lots of hits with Google), but it's even easier to just divide your animal count variables by 10,000 and see what happens.

Let us know!
Susan
sweettravel
Calcite | Level 5
Yes, I resolved the problem after I divided the animal data by 10,000. Thanks a lot for your valuable suggestion!
SteveDenham
Jade | Level 19
What about a slightly different approach, rather than the bivariate poisson? What do you get if you fit differing variance components by class? For example:

proc glimmix data=gender2000;
nloptions maxiter = 100;
class obs class;
model gender = class class*hog class*cattle class*horse class*sheep/
noint s dist=poi;
random _residual_ / subject=obs type=chol group=class ;
covtest homogeneity;
run;

I only suggest this as this leads to a test for homogeneity of variance between the classes, which is not readily available using the bivariate approach.

Steve Denham
sweettravel
Calcite | Level 5
Thanks a lot for your suggestion. I get the following result for the covariance test, yet the coefficient estimation result does not change much. Not sure whether the difference in variance is a problem or not.

Tests of Covariance Parameters
Based on the Residual Pseudo-Likelihood

Label DF -2 Res Log P-Like ChiSq Pr > ChiSq Note

Homogeneity 3 7913.87 0.00 1.0000 DF

DF: P-value based on a chi-square with DF degrees of freedom.
SteveDenham
Jade | Level 19
That result says that there is no evidence for a difference in variance between males and females, which to me means that a common estimate is sufficient for the analysis. You may not need the bivariate approach at all.

Good luck.

Steve Denham

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
  • 5 replies
  • 3197 views
  • 0 likes
  • 3 in conversation