Help using Base SAS procedures

Proc NLMixed with Categorical Variable

Reply
New Contributor
Posts: 2

Proc NLMixed with Categorical Variable

All,

I understand that proc nlmixed do not have the class statement option. I need help to code a categorical variable Var5 with six levels: Ind_A, Ind_B, Ind_C, Ind_D, Ind_E, Ind_F.

The following is the code which uses 4 explanatory variables:

proc nlmixed data=data;

     parms b0=x b1=x b2=x b3=x b4=x

             gm1=x gm=x;

     w=b0+b1*Var1+b2*Var2+b3*Var3+b4*Var;

     ww=w+gm1*t;

     consigma=gm2;

     model Y~normal(ww,consigma);

     random t~normal(0,1) subject=group;

     predict ww out= output (keep=Y pred );

run;


The model converges but I need to incorporate the categorical variable.

Any suggestions?

Respected Advisor
Posts: 2,655

Re: Proc NLMixed with Categorical Variable

Posted in reply to APatricio

PROC GLMMOD.

proc glmmod data=data outdesign=want;

class var5;

model y=var1 var2 var3 var4 var5;

run;

You'll probably want to go in and rename the variables in the 'want' dataset, as they will be named col1, col2, etc.

Steve Denham


Ask a Question
Discussion stats
  • 1 reply
  • 666 views
  • 0 likes
  • 2 in conversation