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
- /
- Why PROC GENMOD outputs parameter estimates for re...

Topic Options

- 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

11-24-2016 06:19 AM - edited 11-25-2016 07:34 AM

Hi,

I fitted a logistic regression for longitudinal data where the response is a binary variable. I have two variables that are fixed (Sex + Initial_Rythm, both of them are categorical variable) and three variables that changed over time (BIS_0 which is a binary variable, BIS and Lactaat which are two continuous variables).

The model specification is shown here:

```
proc genmod data= lda;
class ID Initial_Rythm(ref="3") BIS_0 Sex ;
model y(event="1") = Initial_Rythm Sex BIS_0*t BIS*t Lactaat*t t /dist = binomial link = logit;
repeated subject=ID/sorted type=exch;
by _Imputation_;
ods output GEEEmpPEst = lgparms ;
*output out = run_lda p = prob xbeta = logit;
run;
```

My questions is that: Why do we have even the parameter estimate for the reference group of the interaction term: BIS_0*t. The output of one of the imputed data sets is given below for your reference:

Thank you for any help to clarify this.

I attached in this post the data and the program I used for your convenience.

Accepted Solutions

Solution

11-25-2016
08:05 AM

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

11-25-2016 08:05 AM

Hi, I firgured out the solution: I need to add param = ref after the class statement:

`class ID Initial_Rythm(ref="3") BIS_0(ref="0") Sex / param = ref ;`

So here is the full code:

```
proc genmod data= lda;
class ID Initial_Rythm(ref="3") BIS_0(ref="0") Sex / param = ref ;
model y(event="1") = Initial_Rythm Sex BIS_0*t BIS*t Lactaat*t t /dist = binomial link = logit;
repeated subject=ID/sorted type=exch;
by _Imputation_;
ods output GEEEmpPEst = lgparms ;
*output out = run_lda p = prob xbeta = logit;
run;
```

Thank you again, Ksharp. Based on your previous suggestion, I am now able to solve the problem.

All Replies

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

11-24-2016 10:24 PM

Maybe it is using GLM paramterizal method.

Try

```
proc genmod data= lda;
class ID Initial_Rythm(ref="3") BIS_0(ref="1") Sex ;
OR
proc genmod data= lda;
class ID Initial_Rythm(ref="3") BIS_0(parm=ref) Sex ;
```

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

11-25-2016 03:41 AM

Hi,

Thank you for your reply.

I tried the first option but the output remains the same.

The second option gave an error.

Do you have any other suggestions?

Thank you.

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

11-25-2016 06:49 AM

Your data give me is not right , Y has four levels . Check Attachment. proc import datafile='/folders/myfolders/lda_data.txt' out=lda dbms=csv replace; delimiter=' '; run; proc genmod data= lda; where y in (1 12); class ID Initial_Rythm BIS_0 Sex/param=ref ; /* <---------*/ model y(event="1") = Initial_Rythm Sex BIS_0*t BIS*t Lactaat*t t /dist = binomial link = logit; repeated subject=ID/sorted type=exch; ods output GEEEmpPEst = lgparms ; *output out = run_lda p = prob xbeta = logit; run;

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

11-25-2016 07:31 AM

Hi Ksharp,

Thank you for giving it a try.

Sorry that when I exported data from a .csv file in R (since this blog does not allow to attacht a .csv file, which I don't know why), it created an additional columns (row.names). That was my fault not to command row.names = F.

So please see here the updated data set which should work correctly.

Thank you.

Solution

11-25-2016
08:05 AM

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

11-25-2016 08:05 AM

Hi, I firgured out the solution: I need to add param = ref after the class statement:

`class ID Initial_Rythm(ref="3") BIS_0(ref="0") Sex / param = ref ;`

So here is the full code:

```
proc genmod data= lda;
class ID Initial_Rythm(ref="3") BIS_0(ref="0") Sex / param = ref ;
model y(event="1") = Initial_Rythm Sex BIS_0*t BIS*t Lactaat*t t /dist = binomial link = logit;
repeated subject=ID/sorted type=exch;
by _Imputation_;
ods output GEEEmpPEst = lgparms ;
*output out = run_lda p = prob xbeta = logit;
run;
```

Thank you again, Ksharp. Based on your previous suggestion, I am now able to solve the problem.