turn on suggestions

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

Showing results for

- JMP User Community
- :
- Discussions
- :
- Correct for variables in ANOVA

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
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Aug 10, 2013 3:02 PM
(601 views)

Hi.

I'm really struggling with this and I'm sure I'm missing something really stupid.

I have a set of people who either have a clinical manifestation (X), and so I am doing a series of ANOVAs to present the data in a table that will essentially have something like the table below. There is a variable of interest that I expect is associated with X, so I would like to know if there are group differences.

Variable | X present | X Absent | p |
---|---|---|---|

Age | 0.01* | ||

Duration | 0.01* | ||

Variable of interest (continuous) | 0.01* |

Obviously there are more columns. My problems is that Age and Duration differ between the groups, and then the mean for the variable of interest does too. I want to know if there's a way I can get the 'p value' for the comparison of the mean for the variable of interest for X present vs absent, to make sure the difference isn't just a function of age and duration.

Is it possible with the X by Y -> Oneway = ANOVA platform? Or should I do it in a nominal logistic regression?

6 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Aug 12, 2013 5:28 AM
(288 views)

My problems is that Age and Duration differ between the groups, and then the mean for the variable of interest does too.

What groups are you referring to? What is the variable of interest? These don't appear to have been mentioned in your description. What number is supposed to go in the columns labelled X Present and X Absent?

Please state clearly the ANOVA model you are trying to fit

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Aug 12, 2013 9:55 AM
(288 views)

I was trying not to give too much regarding the actual project away.

Patients either have a certain condition (X) or they don't. I suspect that their score on an evaluation (variable of interest) out of 30 is associated with having condition X. In other words, I suspect the ANOVA will show a difference. However, the ANOVAs for Age and Duration also showed a difference, with patients with X being older and having a longer duration (on average). I wondered if I can correct for Age and Duration and see if there's still a difference in their score on the evaluation (variable of interest).

The only way I know to do something similar is to do a logistic regression with all three as predicting variables and membership to the condition X group being the outcome. But I've seen other author report, in a table seemingly giving ANOVA values and corresponding p values, the 'p value corrected for ____'

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Aug 12, 2013 12:14 PM
(288 views)

Since you didn't state a model, I'll give it a try

Variable of Interest = f(presence of condition, age, duration)

where presence of condition, age and duration are the predictor variables and "variable of interest" is the response

Is that correct?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Aug 12, 2013 12:30 PM
(288 views)

Mmm...

I'll make up some variables:

| Patients without | |||

Male/Female | 23/23 | 21/22 | 0.910 | |

Age | 70.24±9.6 | 66.47±8.0 | 0.048* | |

Depression index | 83.05±12.4 | 90.27±7.4 | 0.001* | |

Muscle pain index |
| 14.70±0.5 | 0.008* |

That would be a strange study.

Anyway, given this example, we can see that all three variables differ across the two groups. The most interesting difference is the 'Muscle pain index'. However, I have reason to believe that the difference in 'Age' and 'Depression' might explain that, rather than a true difference in patients with migraine.

I can do a nominal logistic regression (Fit Model in JMP) with 'Migraine' as the outcome variable (Y in JMP), and 'Age', 'Depression Index' and 'Muscle pain index' as predicting variables (X in JMP). The result is that the muscle pain index has a OR that is significant even when the effect of the other two is taken into account. However, I have seen people report things like this:

I don't think those p values are from a regression, and they don't list anything else that would make me think they did a regression to get them. I was wondering if there is another way to correct for things like 'Age' and when doing ANOVAs like I did above.

Thanks

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Aug 12, 2013 1:18 PM
(288 views)

Hello,

May be the following code can generate the desired results.

ods output MODELANOVA=MODELANOVA;

proc anova data=have;

class X;

model Y=X;

run;

quit;

proc print data=MODELANOVA;

run;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Aug 13, 2013 7:21 AM
(288 views)

Seems to me that if you heve include Age in the model, then you have indeed corrected for the affect of Age.

Without reading the paper that contains the example you provide, I can't comment on the example you give.