Hi Guys,
I want to fit my data with the function as below:
y=a*exp(b*x1)+c*x2+d*x3+e*x4
x1,x2 are continoues preditc variables,and x3,x4 are catogory preditc variables. a,b,c,d,e are paramters which need to be estimated.
Which procedure will work? proc nlin works for catogory preditc variables?
Thanks.
Tomi
If you have x3 and x4 coded as categorical, then you should be ready to use PROC NLIN. If they have not yet been coded, you will probably want to run your data through PROC GLMMOD to automatically convert categorical variables to the coded form needed for regression.
Steve Denham
Thanks, Steve.
I'm supposed to create dummy variables for all catogary data first and then use PROC NLIN to do regreesion, right?
Tomi
Yes, you need dummy variables. If X3 has three levels, then you need two dummy variables. Using GLM-type parametrization, you would need X3_1 (where X3_1 = 1 if X3 is at level 1, 0 otherwise) and X3_2 (where X3_2 = 1 if X3 is at level 2, and 0 otherwise). Same for X4. This means you could have many parameters to estimate and interpret with proc nlin or proc nlmixed. It can get tricky.
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.
Find more tutorials on the SAS Users YouTube channel.