1
$\begingroup$

I have 31 observations for 9 subjects undergoing therapy (4 session for 4 subjects, and 3 session for the rest). I have implemented a mixed model to assess relationships between the observations using Fisher-transformed correlation coefficients.

For example, to assess the effect of finger tapping on correct responses, I correlated the number of finger taps with the percentage of correct responses for each subject (3 pairs of observations for some subjects, and 4 for others). I then perform a Fisher-transform on the 9 resulting correlation coefficients to get 9 z-scores. Then it's a simple matter of testing whether or not those z-scores differ from 0.

What I would like to do is control for subjects' age. However, I'm not clear on the best way to do this. It's easy to calculate the covariance between the z-scores and subject age, but how do I get the effect of finger taps on correct responses, controlling for age?

(As a side note, I've implemented this as a MIXED model in SPSS, but it fails to converge, so I can't trust the results).

$\endgroup$
2
  • $\begingroup$ What do you mean by "relationships between the observations"? What is actually measured at each time point? What is the task? What are finger taps and how do they pertain to correct responses? I'm not quite clear also exactly what the source of the correlation is. $\endgroup$ Oct 13 '11 at 4:13
  • $\begingroup$ Subjects are being taught to communicate using a letter board. Every time they point to a letter, we score a "response." Built in to the score is whether it was successful or not. We're also marking every time subjects tap the table or any surface that isn't the letter board. So then we have a count variable of "irrelevant taps" and a ratio (successful responses / total responses). To get correlations we correlated TAPS with SUCCESSRATIO for each subject (e.g. subject 1 is [TAP_1 TAP_2 TAP_3 TAP_4] vs [SR_1 SR_2 SR_3 SR_4]). There several other variables, but this is general form. $\endgroup$ Oct 13 '11 at 15:03
1
$\begingroup$

Thought I'd update with my solution - I ended up using the lme4 package.

> dataset <- read.csv(<path_to_file>)
> attach(dataset)
> Subject = factor(Subject)
> library(lme4)
> model1 <- lmer(SUCCESSRATIO ~ Age + TAPS + (1|Subject)); summary(model1)

For plotting, I wrote a simple function to add individual subject regression lines:

# lmerlines
function(model, group='Subject', iv=3, lwidth=2) {
    mcoefs <- coefs(model)
    intercepts <- mcoefs[[group]][,1]
    slopes <- mcoefs[[group]][[iv]]
    for (i in 1:length(intercepts)) {
        abline(a=intercepts[i], b=slopes[i], col=1, lwd=lwidth)
    }
}
$\endgroup$
1
  • $\begingroup$ Have you thought of centering age? $\endgroup$
    – Michelle
    Jan 30 '12 at 22:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.