turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- standard error equal to 0 using glimmix procedure

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

10-25-2010 07:11 PM

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!

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!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to sweettravel

10-25-2010 11:43 PM

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

Let us know!

Susan

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to Susan

10-26-2010 02:40 PM

Yes, I resolved the problem after I divided the animal data by 10,000. Thanks a lot for your valuable suggestion!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to sweettravel

10-26-2010 08:33 AM

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

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

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to SteveDenham

10-26-2010 02:50 PM

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.

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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Posted in reply to sweettravel

10-27-2010 07:00 AM

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

Good luck.

Steve Denham