Calcite | Level 5

## SAS QLIM - deriving Marginal Estimates

Hi All

The problem: I am using SAS QLIM to generate an Ordered Probit analysis using the folowing code:

proc qlim;

class <variable names> ;

Model DV = IVs / discrete ;

Ouptut out = <output dataset name> marginal ;

My DV is an ordinal variable with three levels, coded 0,1,2 where 0= Competely disagree; and 2= Completely agree. IVs are a mixture of binary, ordinal and interval variables.

This code generates marginal estimates for each of the IVs for each of the DV levels 1 and 2, but not for 0. My question is: Is it possible to generate Marginal Estimates for all three levels of the DV (not just two)? I have seen comments online that I might need a macro to do this, but I have never used SAS macro before.

Many thanks,

Philip

1 ACCEPTED SOLUTION

Accepted Solutions

## Re: SAS QLIM - deriving Marginal Estimates

Borrowing from @Rick_SAS :

Do you have other questions? If not, you can close this thread by choosing a response to mark as the "Accepted Solution."

SteveDenham

3 REPLIES 3

## Re: SAS QLIM - deriving Marginal Estimates

From the QLIM documentation (the first example - Ordered Data Modeling), I found this:

By default, ordinal probit/logit models are estimated assuming that the first threshold or limit parameter (mu1) is 0. However, this parameter can also be estimated when the LIMIT1=VARYING option is specified.

There is code immediately following that looks like

``````/*-- Ordered Probit --*/
proc qlim data=docvisit;
model dvisits = sex age agesq income levyplus
freepoor freerepa illness actdays hscore
chcond1 chcond2 / discrete(d=normal) limit1=varying;
run;
``````

My first thought about this would be that your IV's are not all interval variables, and so there are going to be levels of the categorical variables set to 0.

You might consider using the OUTPUT statement to get marginal values or predicted values, and then post-processing those.

SteveDenham

Calcite | Level 5

## Re: SAS QLIM - deriving Marginal Estimates

Hi Steve

That worked perfectly. Thank you very much for your help.

Best wishes

Philip

## Re: SAS QLIM - deriving Marginal Estimates

Borrowing from @Rick_SAS :

Do you have other questions? If not, you can close this thread by choosing a response to mark as the "Accepted Solution."

SteveDenham

Discussion stats
• 3 replies
• 539 views
• 4 likes
• 2 in conversation