Bertolt Meyer
2007-Jul-23 10:14 UTC
[R] Multilevel package: Obtaining significance for waba within-group correlation?
Hello everyone, I am employing the waba method from the multilevel package for obtaining a within-group correlation (Description: http://bg9.imslab.co.jp/Rhelp/R-2.4.0/src/library/multilevel/man/waba.html). Does anybody know a way or a calculation for obtaining a significance value for that correlation? And another question: Does anybody know whether it is possible to save individual group-mean-centered values into a new variable? I am quite new to R so please do apologize if either of these questions has an obvious answer that I didn't get. Example: > package(multilevel) > data(bh1996) > waba(bh1996$HRS,bh1996$WBEING,bh1996$GRP) [I would like to obtain the significance of the CorrW value] Thanks for your help, Bertolt -- Bertolt Meyer PhD Student Institute of Psychology & Institute of Information Systems Humboldt University Berlin bmeyer at psychologie.hu-berlin.de phone: +49-30-20939347 mobile: +49-179-4991046 web1: http://ioe-skillmap.hu-berlin.de web2: http://amor.rz.hu-berlin.de/~h04440am
Christophe Pallier
2007-Jul-23 13:02 UTC
[R] Multilevel package: Obtaining significance for waba within-group correlation?
On 7/23/07, Bertolt Meyer <bmeyer@psychologie.hu-berlin.de> wrote:> > And another question: Does anybody know whether it is possible to save > individual group-mean-centered values into a new variable?If data is in 'x' and grouping factor is 'group', use "x - tapply(x, group, mean)[group]" For example: group <- gl(2,10) x <- rnorm(20) x - tapply(x, group, mean)[group] -- Christophe Pallier (http://www.pallier.org) [[alternative HTML version deleted]]
Maybe Matching Threads
- USING MULTILEVEL PACKAGE AND WABA FUNCTION
- Newbie question: How to use tapply() on several vectors simultaneously
- vector indexing problem in multilevel data: assigning a specific value to all group members
- Help with shading a polygon below a segment of a curve (normal distribution)
- lmer() causes segfault