BookmarkSubscribeRSS Feed
Barkamih
Pyrite | Level 9

Hi all, 

 

I'm looking for someone to write this model mathematically if you don't mind.

 

regards 

 

 

 

proc GLIMMIX data=herd;
class testyear time ;
model mpd = testyear / oddsratio solution;
random herd(Time);
lsmeans  testyear / e cl oddsratio plots  ;
ods output lsmeans = MEANS;
run;
3 REPLIES 3
ballardw
Super User

What do you mean by " write this model mathematically"?

Are you looking for some sort of raw code to duplicate the functionality?

 

Or an explanation of the calculations done? Read the friendly manual, i.e. the documentation for the procedure in the DETAILS section.

 

Something else.

Barkamih
Pyrite | Level 9

 

something like this:

 

y = A + b + e 

 

Y  is a binary 

a fixed effect 

b is random nested within 12 months 

e is residual 

Reeza
Super User

You can use a CODE statement to have the code piped to a file and you can use that to help you determine your final equation if you're unsure of the format.

 

https://documentation.sas.com/?cdcId=statcdc&cdcVersion=14.2&docsetId=statug&docsetTarget=statug_gli...

 

code file='/folders/myfolders/glimmix_score_code.sas';

Changing the path to something relevant for you, the idea is above and then check the program created for the logic. 

 


@Barkamih wrote:

Hi all, 

 

I'm looking for someone to write this model mathematically if you don't mind.

 

regards 

 

 

 

proc GLIMMIX data=herd;
class testyear time ;
model mpd = testyear / oddsratio solution;
random herd(Time);
lsmeans  testyear / e cl oddsratio plots  ;
ods output lsmeans = MEANS;
run;

 

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 971 views
  • 0 likes
  • 3 in conversation