BookmarkSubscribeRSS Feed
nelsondn
Calcite | Level 5

I am attempting to estimate a binary probit model using proc qlim in SAS OnDemand (v 9.4). As far as I was aware and after looking at the SAS User Guide my coefficient estimates should have values between -1 and 1. When I run the code below (modeled after the User Guide) some of the estimates I get are outside of the -1 to 1 range. The model includes continuous variables: pi and lv, and binary variables: denied, race, ccs, pbcr, uria, se, multi, iraj, and male. 

 

proc qlim;
model denied = pi race ccs pbcr uria se lv multi gift iraj male /discrete;
title 'PROBIT estimation';
run;

 

I also noticed that when added to the end of the model statement  </discrete>  did not change colors like is typical for other </options> statements. I'm not quite sure if I made a mistake or had some incorrect assumptions but any advice or thoughts would be great. 

 

Thanks! 

 

 

2 REPLIES 2
Christian5
SAS Employee

Hi there,

 

I hope I understood your question correctly.

 

As far as the PROBIT regression coeffieints go, there is no obvious restriction  (-1,1).

To verify and convince you of that, I modified the code available here:

https://blogs.sas.com/content/iml/2014/06/25/simulate-logistic-data.html

 

The modified code addressing the PROBIT case is below.

 

It is important to notice that the original coefficients  are:

beta = {2, -4, 1};

Indeed, after increasing the sample size to 10000, you will see that the estimates are close:

beta = {2.049585, -4.099663, 1.023898};

 

*--------------------- PROBIT CODE --------------------------------------;

/* Example from _Simulating Data with SAS_, p. 226--229 */
%let N = 10000; /* N = sample size */
proc iml;
call randseed(1);
X = j(&N, 3, 1); /* X[,1] is intercept */
/* 1. Read design matrix for X or assign X randomly.
For this example, x1 ~ U(0,1) and x2 ~ N(0,2) */
X[,2] = randfun(&N, "Uniform");
X[,3] = randfun(&N, "Normal", 0, 2);

/* Logistic model with parameters {2, -4, 1} */
beta = {2, -4, 1};
eta = X*beta; /* 2. linear model */
mu = probnorm(eta); /* 3. transform by inverse  */

/* 4. Simulate binary response. Notice that the
"probability of success" is a vector (SAS/IML 12.1) */
y = j(&N,1); /* allocate response vector */
call randgen(y, "Bernoulli", mu); /* simulate binary response */

/* 5. Write y and x1-x2 to data set*/
varNames = "y" || ("x1":"x2");
Out = X; Out[,1] = y; /* simulated response in 1st column */
create LogisticData from Out[c=varNames]; /* no data is written yet */
append from Out; /* output this sample */
close LogisticData;
quit;

 

proc qlim data=LogisticData plots=none;
model y = x1 x2 / discrete(distribution=probit);
run;

*------------------------------------------------------------------------------------------;

 

gunce_sas
SAS Employee

Hello,

 

Please check out the link below to obtain the details about the binary probit model that QLIM estimates.

 

http://go.documentation.sas.com/?docsetId=etsug&docsetTarget=etsug_qlim_details01.htm&docsetVersion=...

 

As you see there, the probit model has an underlying latent model

 

y* = x’beta + epsilon

 

where y* cannot be observed but we can observe y and the relationship between y and y* is based on

 

y = 1 if y* >0

y = 0 otherwise

 

When you say “the PROBIT regression coefficients” I understand that you are referring to beta in this model. There are no particular restrictions on beta as they are the regression coefficients from an unobserved linear model.

 

When it comes to the second part of your question, it is true that the keywords like the model options change into the blue color to indicate that they are keywords but if this does not work do not worry. As long as you are not getting an error in the log window, you are not making a mistake for that option.     

 

I hope this helps,

Gunce

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!

Multiple Linear Regression in SAS

Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 707 views
  • 0 likes
  • 3 in conversation