BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Hanyu
Fluorite | Level 6

As is well known that quasi maximum likelihood estimation requires computing first derivative of the individual likelihood at each observation. Does anybody know how to implement it in SAS?d

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

I assume you want to use finite difference approximations. Finite differences are available by using the NLPFDD function. See the article "Optimizing? Two hints for specifying derivatives."

View solution in original post

4 REPLIES 4
Rick_SAS
SAS Super FREQ

I assume you want to use finite difference approximations. Finite differences are available by using the NLPFDD function. See the article "Optimizing? Two hints for specifying derivatives."

Hanyu
Fluorite | Level 6

Thank you Dr.

Hanyu
Fluorite | Level 6

Dr. I have defined a module that returns a vector containing individual likelihood value at each observation. Then I want to compute the gradient using NLPFDD but SAS reports that the module must return  a scalar.

Rick_SAS
SAS Super FREQ

The module should return the likelihood value for a specified value of the parameters, given the data.  The entire data set is used as input to the likelihood function, so it is not correct to say that the likelihood is evaluated "at each observation."  Look at the article "Maximum likelihood estimation in SAS/IML" and see if that helps.  Notice that the module takes a single argument, shich is the vector of parameters fr the model.  The data are specified by using the GLOBAL clause.

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.

From The DO Loop
Want more? Visit our blog for more articles like these.
Discussion stats
  • 4 replies
  • 990 views
  • 0 likes
  • 2 in conversation