Cross Variable T-TestsI have a dataset with a categorical variable (treatment).
The data columns have comparisons that take place at different times (1, 2, 4, and 6).
For each comparison variable there are columns for "Device applied" and "No Device".
So a person could be either an active or placebo (treatment) with either a device applied or not applied for each comparison variable.
For example ... "Comparision 01" could have four different combinations ...
Treatment - No device
Treatment - Device
Placebo - No device
Placebo - Device
Each of these would have its own mean. What I'm trying to figure out how to do in JMP is to do cross-comparison T-tests which would compare "Placebo - No device" against "Treatment - device". I can compare Active to active or Placebo to placebo, but I'm not seeing any way to compare across the groups.
Do I just take the results from "Distribution" with Treatment as a "By" splitter and then do a "Test mean" by plugging in the comparison I want into the Hypothesis test? That seems a bit clunky.
AnalyticsRe: Cross Variable T-TestsThis case is a classic 'two-way ANOVA" scenario Set up your data table with Condition (Treatment or Placebo), Device (Yes or No) and the Y (response). Select Analyze > Fit Model. Select Condition and Device, click Macros, and select Full Factorial. Select Y and click A. Click Run.
Everything you need is there.
Re: Cross Variable T-TestsThanks - I've done that report but there is no table I can see which shows the T-tests comparing the cross-groups. There is a Least Squares Means table for the Treatment*Device leverage plot, but there do not appear to be any t-tests of the means against each other. The red dropdown Student's T gives a generic letter report table but it isn't showing the actual t-test values.
Oh - and just to make sure I've got the data table set up properly ... the table has (essentially) two entries for each subject. For example - Subject "HMA" exists both as row #1 and row #61 (there are 60 cases). So there is a stacked effect where each subject has 2 entries to account for their Placebo/Active response and the Device/No Device response. So the 60 cases in the data table create 120 rows (2 for each respondent). That how the ANOVA needs to have its data structured?
Re: Cross Variable T-TestsFirst of all, I do not recommend using the Student t-test in this post hoc analysis. You will experience inflated type I error rates. Use Tukey's method instead. Also, are you asking for the t-ratios? Why is that necessary?
This sounds like two separate, parallel studies. You obtain a response for Treatment (Placebo, Active) and another response for Device (Yes, No). Is that interpretation correct? I assumed that each subject was observed once with a combination of Treatment and Device.
Re: Cross Variable T-TestsThe trial was set up in this manner...
60 subjects were enrolled.
These 60 subjects were assigned to either Active or Placebo treatments (final 40 active, 20 placebo)
All 60 subjects in addition to the treatment used a device on a section of the body (right side) with no device on the left side.
Evaluations were performed for several characteristics both by the subject and an expert observer.
So all 60 subjects have a "device side" set of evaluations and a "no device" set of evaluations while 40 subjects are in the active arm and 20 in the placebo arm.
I'm able to get t-test mean comparisons for the different evaluations of the 1st visit to the last visit. I can also get the t-test results for comparing the placebo group means to the active means for each visit. I can also get the t-tests for comparing the evaluation means for the device side against the no-device side. What I'm trying to coax out are the t-tests that compare the means of the "Placebo - No Device" against the "Active - Device".
As an illustration, For "Evaluation01" I have the following means...
Placebo: No Device: Visit 01: 2.95
Placebo: Device Side: Visit 01: 2.95
Active: No Device: Visit 01: 2.65
Active: Device Side: Visit 01: 2.65
Doing a t-test comparing Placebo: No device versus Placebo: Device Side (2.95 to 2.95) yields a value of 1 (obviously) because the two are the same.
Doing a t-test comparing Placebo: No device versus Active: No device (2.95 to 2.65) yields a value of 0.19 for the first visit.
Doing a t-test comparing Placebo: No device: Visit 01 versus Placebo: No device: Final Visit (before/after test of 2.95 to 2.65) yields a value of 0.03 (a significant difference).
Comparing Placebo: No Device (2.95) directly to Active: Device Side (2.65) is where I'm having troubles getting that direct mean to mean t-test. Obviously the result will be similar to the Placebo: No device vs. Active: No device test (since the numbers are the same). However, not all the evaluations are the same and so I need to do the tests on all of these cross-comparisons to confirm the presence (or absence) of any significant differences.
Hope that helps explain the setup a bit better.
Re: Cross Variable T-TestsYou used Subject for 'blocking,' which is smart. It will have a random effect, though. You should compute the Treatment difference for a 'matched pairs' analysis. Otherwise, the subject variation will obscure the Treatment effect.
Alternative, use Fit Least Squares with Treatment, Device Status, and Subject as the effecfs. You can include an interaction term. Then you can use the various tests in this platform.
Re: Cross Variable T-TestsI actually did a matched pair approach the first time around, but I could never get the result to produce a t-test on the comparison of interest. Below is an example of the output obtained when setting it up with the matched pair test in the Specialized Modeling menu. The comparison puts the Subject evaluation on the non-device side and matches it against the Subject evaluation on the device side as the Y variables for the paired response and then sets the Active/Placebo variable as the "X grouping".
The matched pair will generate a table that shows the "Across Groups" means properly. But is the "Test Across Groups" table's F-probability the T-test? I've never seen a T-test manifested in that manner.