BookmarkSubscribeRSS Feed
jkj4
Calcite | Level 5

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?

2 REPLIES 2
ballardw
Super User

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.

jkj4
Calcite | Level 5
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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2 replies
  • 1892 views
  • 0 likes
  • 2 in conversation