Programming the statistical procedures from SAS

Proc GLIMMIX chi-sq /df

Reply
Occasional Contributor
Posts: 8

Proc GLIMMIX chi-sq /df

Hello,

 

I have a question about why my model works in one instance, but when running the same data in a different unit function, the model no longer works.

 

Here is the example.  I have a study where I calculated cost per pound.  My model worked very well and did not have any over-dispersion as evidenced by a Gener. Chi-Square / DF of less than 1.0.  I needed to re-run the same numbers and wanted the units of evaluation to be cost per ton.  I took my cost per pound and multiplied by 2000 to get cost per ton.  When I ran these numbers using the same model my Gener. Chi-Square / DF was above 1000.  Why did this happen? And how do I correct?

Super User
Posts: 13,583

Re: Proc GLIMMIX chi-sq /df

Sounds like a data dependency but you haven't shared any data.

 

As a minimum share your Proc glimmix code. I am guessing one likely issue is one of the other variables in you model was based on "pounds" that needs a conversion for tons OR your original calculation that "calculated cost per pound" should be revisited and the "per ton" calculated there.

 

I realize that data may be confidential. If you can duplicate the issue with non-sensitive data then you could provide that. Example data is best provided as data step code if you want anything tested. Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

Highlighted
Occasional Contributor
Posts: 8

Re: Proc GLIMMIX chi-sq /df

proc glimmix data=columbus;
class trt year day rep ;
model cost_toncp = trt day year trt*day trt*year trt*day*year/ddfm=kenwardroger;
random rep*day*year/subject=rep ;
lsmeans trt day year/lines;



This works well on cost per pound but not for cost per ton.


None of the other variables needed to be converted.
Ask a Question
Discussion stats
  • 2 replies
  • 151 views
  • 0 likes
  • 2 in conversation