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
- /
- Testing difference in genmod

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

07-24-2015 12:32 AM

Dear all, wish you all well.

Can anyone please enlighten me on my understanding of the partial genmod output below?

The result shows that there is a decreasing trend in y over the 2-year period and the decrease does not vary from responses to A1.

I tried to insert the interaction plot here to illustrate my question but it doesn't work and I don't know why given the small image size.

According to the interaction plot, all the lines joining the LSM mean values from 2010 and 2011 by A1 seem to be parallel and show a decreasing trend. However, 2=Disagree a little line intersects with 3=Neither agree nor disagree line. How do I find out/quantify which of the deceases from A1 responses is different given the output?

Your insight is greatly appreciated. Thank you very much.

proc genmod data=temp order=internal plots=all;

class id time var1;

MODEL y= var1 time var1*time / type3 dist=gamma link=log;

lsmeans time*var1 / om diff ilink cl plots=all;

slice time*var1 / sliceby=var1 ilink diff nof;

repeated subject=id / type=cs;

run;

Score Statistics For Type 3 GEE Analysis | ||||

Source | DF | Chi-Square | Pr > ChiSq | |

time | 1 | 28.17 | <.0001 | p-value<0.05 indicates that there is a change in y over the 2-year period. |

A1 | 4 | 13.72 | 0.0082 | p-value<0.05 indicates A1 responses do change in y. |

time*A1 | 4 | 3.56 | 0.4685 | p-value>0.05 indicates that A1 responses do not change in y in different ways over the 2-year period. |

time*A1 Least Squares Means | |||||||||||||

Year | A1 | Margins | Estimate | Standard Error | z Value | Pr > |z| | Alpha | Lower | Upper | Mean | Standard Error of Mean | Lower Mean | Upper Mean |

2010 | 1=Disagree a lot | WORK.LONG | 3.779 | 0.04276 | 88.38 | <.0001 | 0.05 | 3.6952 | 3.8628 | 43.7739 | 1.8718 | 40.2548 | 47.6007 |

2010 | 2=Disagree a little | WORK.LONG | 3.8023 | 0.03689 | 103.06 | <.0001 | 0.05 | 3.73 | 3.8746 | 44.8055 | 1.6531 | 41.6799 | 48.1654 |

2010 | 3=Neither agree nor disagree | WORK.LONG | 3.8649 | 0.06677 | 57.88 | <.0001 | 0.05 | 3.734 | 3.9957 | 47.6962 | 3.1846 | 41.8457 | 54.3647 |

2010 | 4=Agree a little | WORK.LONG | 3.8583 | 0.05042 | 76.53 | <.0001 | 0.05 | 3.7595 | 3.9571 | 47.383 | 2.3889 | 42.9249 | 52.3043 |

2010 | 5=Agree a lot | WORK.LONG | 4.1424 | 0.07728 | 53.6 | <.0001 | 0.05 | 3.9909 | 4.2938 | 62.9528 | 4.8648 | 54.1049 | 73.2476 |

2011 | 1=Disagree a lot | WORK.LONG | 3.6229 | 0.03579 | 101.23 | <.0001 | 0.05 | 3.5528 | 3.693 | 37.4459 | 1.3401 | 34.9094 | 40.1667 |

2011 | 2=Disagree a little | WORK.LONG | 3.7304 | 0.04632 | 80.53 | <.0001 | 0.05 | 3.6397 | 3.8212 | 41.6977 | 1.9316 | 38.0786 | 45.6608 |

2011 | 3=Neither agree nor disagree | WORK.LONG | 3.6591 | 0.07028 | 52.07 | <.0001 | 0.05 | 3.5213 | 3.7968 | 38.8256 | 2.7285 | 33.8298 | 44.5592 |

2011 | 4=Agree a little | WORK.LONG | 3.7249 | 0.0533 | 69.89 | <.0001 | 0.05 | 3.6205 | 3.8294 | 41.4687 | 2.2103 | 37.3552 | 46.0353 |

2011 | 5=Agree a lot | WORK.LONG | 3.9732 | 0.08752 | 45.4 | <.0001 | 0.05 | 3.8017 | 4.1447 | 53.1546 | 4.6522 | 44.7757 | 63.1015 |

Simple Differences of time*A1 Least Squares Means | ||||||

Slice | time | _time | Estimate | Standard Error | z Value | Pr > |z| |

A1 1=Disagree a lot | 2010 | 2011 | 0.1561 | 0.04432 | 3.52 | 0.0004 |

A1 2=Disagree a little | 2010 | 2011 | 0.07188 | 0.04015 | 1.79 | 0.0734 |

A1 3=Neither agree nor disagree | 2010 | 2011 | 0.2058 | 0.0817 | 2.52 | 0.0118 |

A1 4=Agree a little | 2010 | 2011 | 0.1333 | 0.05185 | 2.57 | 0.0101 |

A1 5=Agree a lot | 2010 | 2011 | 0.1692 | 0.06491 | 2.61 | 0.0092 |

Accepted Solutions

Solution

07-24-2015
08:07 AM

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

Posted in reply to wong

07-24-2015 08:07 AM

The simple difference tests follow from the overall test--the two years differ, and it is roughly the same difference for all categories of A1. The estimate values all indicate a change with a range of 0.07 to 0.21, where all changes have 'effect sizes' (Z scores) of at least 1.79. (I'm weaseling around the p values here, because I don't know what your cutoff for significance is). There really does not look like there is any strong evidence for an interaction.

Am I making sense, or did I miss the point of your question?

Steve Denham

All Replies

Solution

07-24-2015
08:07 AM

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

Posted in reply to wong

07-24-2015 08:07 AM

The simple difference tests follow from the overall test--the two years differ, and it is roughly the same difference for all categories of A1. The estimate values all indicate a change with a range of 0.07 to 0.21, where all changes have 'effect sizes' (Z scores) of at least 1.79. (I'm weaseling around the p values here, because I don't know what your cutoff for significance is). There really does not look like there is any strong evidence for an interaction.

Am I making sense, or did I miss the point of your question?

Steve Denham

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

Posted in reply to SteveDenham

07-26-2015 10:45 PM

Hi Steve. I really appreciate you taking the time answering my question.

My analysis is based on 5% level of significance FYI.

If the p-value of the interaction term is > 0.05 indicates the change for all levels of var1 is no difference.

Does each of the significant simple difference tests by var1 reflect from the significant main time effect?

Also, is it still sensible to quantify the simple differences and 95% C.I. on the original scale as you previously posted here ()?

Thank you very much.

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

Posted in reply to wong

07-27-2015 08:14 AM

Hi KC,

Some answers:

If the p-value of the interaction term is > 0.05 indicates the change for all levels of var1 is no difference.

*A non-significant interaction, but significant main effects, implies that the differences between the levels of var1 is the same at all times, and that the differences between levels of time is the same for all levels of var1. Therefore, the best estimates of effects are the marginal means (main effect means).*

Does each of the significant simple difference tests by var1 reflect from the significant main time effect?

*Yes, that is what is being shown.*

Also, is it still sensible to quantify the simple differences and 95% C.I. on the original scale as you previously posted here

*While you can report these, the marginal differences are probably more meaningful. Try adding the following to your code:*

lsmeans time var1/diff cl ilink;

*to get the marginal means and differences.*

Steve Denham