[R] converting a t statistic to r2
Spencer Graves
spencer.graves at pdf.com
Sat Aug 13 20:17:42 CEST 2005
The formula R2 = t2/(df+t2) applies only if a single intercept and a
single slope are estimate with simple linear regression in something
like B~A or B~age, but not with interaction nor quadratic term in age.
For further information, I just got 4 hits from 'RSiteSearch("R^2 in
lme")', two of which seemed relevant to your question:
"http://finzi.psych.upenn.edu/R/Rhelp02a/archive/17572.html", and
"http://finzi.psych.upenn.edu/R/Rhelp02a/archive/34377.html".
If you still want more help after this, please submit another
question -- after reading the posting guide!
"http://www.R-project.org/posting-guide.html". The Posting Guide serves
two purposes: (a) It helps people get better answers to their questions
quicker. (b) It makes it easier for people who try to answer such
questions to understand what the questioner wants. It seems to succeeds
fairly well on both counts when it is used. I think I can see in a
question whether the submitter has paid adequate attention to the
posting guide: The questions tend to be better focused, more complete,
and easier to understand and reply to. If you want free consulting, you
have to pay for it.
spencer graves
--
Shaw, Philip (NIH/NIMH) wrote:
> HI
>
> I wonder if anyone can help. I have a longitudinal sample of 100 subjects:
> 200 data points were acquired starting at different ages and at irregular
> intervals (subjects have different numbers of repeated data points, so some
> have only one data point). I have been examining the relationship over time
> (it is quadratic) of continuous variables A on variable B. To model this I
> have been using linear mixed models in R.
>
> B~A*age +A*I(age^2) + random term (for individual)
>
> I get t values associated with A, age and A*age.
>
> How (or can) the t value for A be converted to a correlation (r) or variance
> value?
>
> I recall that R2 = t2/(df+t2)
>
> But can this be applied to linear mixed models and what are the degrees of
> freedom?
>
> I hope this is reasonably clear,
>
> Many thanks for any opinions
>
> Philip
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
--
Spencer Graves, PhD
Senior Development Engineer
PDF Solutions, Inc.
333 West San Carlos Street Suite 700
San Jose, CA 95110, USA
spencer.graves at pdf.com
www.pdf.com <http://www.pdf.com>
Tel: 408-938-4420
Fax: 408-280-7915
More information about the R-help
mailing list