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
- /
- Proc GLIMMIX chi-sq /df

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

2 weeks ago

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?

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

Posted in reply to jkj4

2 weeks ago

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.

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

Posted in reply to ballardw

2 weeks ago

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.

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.