Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

print.polycor

Print Method for polycor Objects


Description

print method for objects of class polycor, produced by polychor and polyserial.

Usage

## S3 method for class 'polycor'
print(x, digits = max(3, getOption("digits") - 3), ...)

Arguments

x

an object of class polycor, as returned by polychor or polyserial.

digits

number of significant digits to be printed.

...

not used.

Value

Invisibly returns x; used for its side effect — i.e., printing.

Author(s)

See Also

Examples

if(require(mvtnorm)){
    set.seed(12345)
    data <- rmvnorm(1000, c(0, 0), matrix(c(1, .5, .5, 1), 2, 2))
    x <- data[,1]
    y <- data[,2]
    cor(x, y) # sample correlation
    }
if(require(mvtnorm)){
    x <- cut(x, c(-Inf, .75, Inf))
    y <- cut(y, c(-Inf, -1, .5, 1.5, Inf))
    polychor(x, y, ML=TRUE, std.err=TRUE)  # polychoric correlation, ML estimate
    }

polycor

Polychoric and Polyserial Correlations

v0.7-10
GPL (>= 2)
Authors
John Fox [aut, cre]
Initial release
2019-07-22

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.