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

Hi,

 

How can I solve in IML a minimization problem as following?

 

Having a known matrix e.g. M= {0.8 0.2, 0.4 0.6} and a known generator matrix G, I want to solve a and b (a diagonal matrix A) such that the distance between M[,2] and exp(A*G) [,2] is minimized – basically the minimization is addressed to the last column in matrices only ...

 

Many thanks,

Dan

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

Your objective function is

SSQ( (exp(A*G)  - M)[,2] )

 

Write the function to be minimized as a function of the diagonal parameters a and b. You can use any NLP routine to minimize the function.

 

There are many examples on my blog (search for 'NLPNRA') . Start with the article that maximizes the likelihood function, which includes links to the NLP documentation. Set opt[1]=0 to specify minimization.

 

View solution in original post

2 REPLIES 2
Rick_SAS
SAS Super FREQ

Your objective function is

SSQ( (exp(A*G)  - M)[,2] )

 

Write the function to be minimized as a function of the diagonal parameters a and b. You can use any NLP routine to minimize the function.

 

There are many examples on my blog (search for 'NLPNRA') . Start with the article that maximizes the likelihood function, which includes links to the NLP documentation. Set opt[1]=0 to specify minimization.

 

dannegrila
Calcite | Level 5

Many thanks Rick.

 

P.S. exp(.) stands for matrix exponential (expmatrix)

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
  • 2 replies
  • 1042 views
  • 0 likes
  • 2 in conversation