lower2R: Convert a vector containing correlations into a correlation...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

lower2R converts a vector containing correlations into a correlation matrix.

Usage

1
lower2R(x, varname=NULL)

Arguments

x

a numeric vector contains the correlations

varname

a character vector contains the row and column names

Details

This function converts a vector containing correlations into a correlation matrix. x contains the elements that consist of the lower triangle of the correlation matrix. The length of varname should be equal to the number of rows and columns in the correlation matrix.

Value

Return a matrix containing the correlation matrix.

Author(s)

Yasuyuki Okumura
Department of Social Psychiatry,
National Institute of Mental Health,
National Center of Neurology and Psychiatry
yokumura@blue.zero.jp

References

Kline RB (2004) Beyond significance testing: Reforming data analysis methods in behavioral research. Washington: American Psychological Association.

See Also

svar, ssd, svar, ssd2sd, r2cov

Examples

1
2
3
4
5
6
7
8
9
lower2R(c(1:15))

##Kline (2004) Table 6.15
lower2R(c(.77,.59,.50,.48,.46,.81,.72,.69,.68,.89,
        .84,.8,.91,.88,.93))

lower2R(c(.77,.59,.50,.48,.46,.81,.72,.69,.68,.89,
        .84,.8,.91,.88,.93), 
        varname=paste("trial", 1:6, sep=""))

rpsychi documentation built on May 1, 2019, 10:10 p.m.