BookmarkSubscribeRSS Feed
TomiKong
Fluorite | Level 6

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

3 REPLIES 3
SteveDenham
Jade | Level 19

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

TomiKong
Fluorite | Level 6

Thanks, Steve.

I'm supposed to create dummy variables for all catogary data first and then use PROC NLIN to do regreesion, right?

Tomi

lvm
Rhodochrosite | Level 12 lvm
Rhodochrosite | Level 12

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.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

What is ANOVA?

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.

Discussion stats
  • 3 replies
  • 1534 views
  • 0 likes
  • 3 in conversation