turn on suggestions

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

Showing results for

Find a Community

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Re: Proc MIANALYZE for categorical interaction

Topic Options

- 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
- RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

02-27-2018 01:46 PM

I am having trouble generating pooled effect estimates for an interaction between two categorical variables, using multiple linear regression with robust variance estimation and stabilized inverse probability of treatment weights - essentially a 'multiple informant' model. The code I'm working with is:

```
Proc genmod data=data plots=(dfbetacs);
class studyid predict_1 (ref='0');
model z_bw=predict_1*time race*time bmi*time age*time educat*time smoke*time/noint dist=normal link=identity id=studyid;
repeated subject=studyid/type=ind ecovb;
weight &weight;
by _imputation_;
ods output GEEEmpPEst=emp_est GEERCov=emp_covb
parmInfo=pinfo;
run;
Proc mianalyze parms(classvar=level)=emp_est covb = emp_covb parminfo=gmpinfo mult;
class predict_1*time;
modeleffects predict_1*time;
run;
```

Predict_1 is a 3 level categorical variables (i.e., 1st, 2nd, 3rd tertile), time is a 2 level categorical variable. My model works fine but I'm unable to generate the pooled estimate for predict_1*time at each of the 6 potential levels. However, I am receiving an error message that I've been unable to correct in that SAS doesn't appear to be recognizing the "predict_1*time" as an effect/Parm name:

"ERROR 22-322: Syntax error, expecting one of the following: a name, ;, -."

"ERROR 200-322: The symbol is not recognized and will be ignored."

Any ideas? Please!

Accepted Solutions

Solution

03-05-2018
09:48 AM

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

Posted in reply to ProfB

03-01-2018 10:08 AM

Try this:

```
Proc mianalyze parms(classvar=level)=emp_est;
class predict_1;
modeleffects predict_1*time;
run;
```

You won't be able to use the MULT option since you have a CLASS variable. This also means you do not need the COVB= option either.

All Replies

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

Posted in reply to ProfB

02-27-2018 11:40 PM

Use

**class predict_1 time;**

no asterisk.

PG

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

Posted in reply to PGStats

02-28-2018 12:02 PM

Thanks, but no luck, "The model effect predict_1 is not in the PARMS= data set." I don't have the individual effect of predict_1 in the model.

Solution

03-05-2018
09:48 AM

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

Posted in reply to ProfB

03-01-2018 10:08 AM

Try this:

```
Proc mianalyze parms(classvar=level)=emp_est;
class predict_1;
modeleffects predict_1*time;
run;
```

You won't be able to use the MULT option since you have a CLASS variable. This also means you do not need the COVB= option either.

Highlighted
## Re: Proc MIANALYZE for categorical interaction

Options

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

Posted in reply to SAS_Rob

03-01-2018 11:39 AM

Success!!! Thank you so much!