Help using Base SAS procedures

Proc NLP Use NLMixed instead?

Reply
Occasional Contributor
Posts: 7

Proc NLP Use NLMixed instead?

Hi,

I am currently using proc NLP with least sqaures to estimate some parameters for a model.

I need to do the following:

1. Compare different models using AIC.

2. Test parameter equivalents. (i.e. estimates alpha and beta and gamma, then test alpha-gamma=0)

I have the proc NLMIXED, which will output the fit statistics (satisfying my need for the AIC values) and has the CONTRAST option (satisfying my need to test paramter equivalents).

However, I am not sure how to adjust the model I am using in NLP so that I can estimated my parameters in NLMIXED.

I know that the NLMIxed uses maximum likelihood estimation, but in my case I think that maximum likelihood should give me the same estiamtes as least squares estimation.

What I am currently doing in NLP is as follows:

%macro nlptk(certain);

proc nlp data=Work.Prospect outest=&certain;

lsq z;

parms alpha=1, gamma=1;

bounds 0.0001 < gamma < 2, 0.0001 < alpha < 2;

weight = (nn_p1 ** gamma) /( ( (nn_p1 ** gamma) + (1-nn_p1) ** gamma) ** (1/gamma) );

  value1 = nn_z1 ** alpha;

  value2 = nn_z2 ** alpha;

z  = (((weight * value1 + (1-weight) * value2) ** (1/alpha)) - &certain)  / &certain;

%mend nlptk;

When I try to run proc NLMixed it looks like this:

%macro nlmixtk(certain);

proc nlmixed data=Work.Prospect;

parms alpha=1, gamma=1;

bounds 0.28 < gamma < 2, 0.0001 < alpha < 2;

  weight = (nn_p1 ** gamma) /( ( (nn_p1 ** gamma) + (1-nn_p1) ** gamma) ** (1/gamma) );

  value1 = nn_z1 ** alpha;

  value2 = nn_z2 ** alpha;

model &certain  ~ general((weight * value1 + (1-weight) * value2) ** (1/alpha)) ;

%mend nlmixtk;

I have attached a file with the details of then nonlinear model I am trying to estimate.

1. Can I use NLMixed for what I am trying to do? If not, what can I do to get AIC values for my model as well as test the different parameter equivalents?

2. Can someone help me to understand how to write the proper model statment for what I am trying to do?

I am really stuck, any help would be great!

Thanks,

Jen


Model to Estimate.jpg
Ask a Question
Discussion stats
  • 0 replies
  • 224 views
  • 0 likes
  • 1 in conversation