BookmarkSubscribeRSS Feed
bigbigben
Obsidian | Level 7

Assuming I have a set of data where the response variable y only takes the value of 0 and 1, and x are the covariate.

Follow the logic of the logistic function, define:

p=Probability(y=1) and we know the underlying function is that

p=  1/(1+exp(-beta*x))

How should I write the SAS code for it?

Is the following correct:

proc genmod data=XXXX

       model y= x/dist=binomial

I am not sure if SAS actually maximize the likelihood function according to the aforementioned specification or SAS simply takes

g(y)=logit(y)=x*beta and run a OLS type regression to get beta.

If that is case, I do not think , and what should be the correct setup?

Thank you very much.

2 REPLIES 2
lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

Both GENMOD and LOGISTIC (and other PROCs) use MLE for a binomial distribution, definitely not OLS. Check out LOGISTIC for great graphics.

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 Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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