We are students from Taiwan.While practicing SAS, we met some problems on coding IML.
We could not figure out the solution.
The attachment is our code.
The system keeps showing ERROR,but we don't know why.
And we couldn't fix it.
Hope any hero can find the mistake in our coding , and give us some hint. We look forward to receive reply.
It looks like you are doing Maximize Likelihood Estimate.
But your code is not completed and you don't give us a sample data to test your code yet ?
And what is your ERROR information ?
Check Rick's blog , might give you some clue how to do MLE .
http://blogs.sas.com/content/iml/2011/10/12/maximum-likelihood-estimation-in-sasiml.html
We have already read this website. And referred the code to write our code.
We guess the attachment code we writed main problem appears in the following part.
print Param[c={"R0" "B" "lambda" "simga"} label=""] LogLik;
p = param[1,];
print p;
f = LogLik(p);
print f;
print Param[c={"R0" "B" "lambda" "simga"} label=""] LogLik;
In addition, we don't use date to test .
We just use sas to run and revise our code.
We want to make sure our code is correct first.
If possible, wish you could give us more direction to revise our code again.
As I said before, Your code is not completed. It is hard to say something without any data to test.
And you event don't post the ERROR information.
Here I found a problem :
1)you have 4 parameter, but you only initiate 2 (p=......)?
2)in your function X have 4 columns, But you only read 2 columns. That is not right.
Your CON Matrix is not completed.
Should look like :
con = { 0 0 0 0,
. . . .};
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.
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.