Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- Proc NLP Use NLMixed instead?

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

08-03-2011 10:17 PM

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