Learn R Programming

eRm (version 0.15-5)

phi.range: Example User Function

Description

Calculates the $R_\phi$ statistic, i.e., the range of the inter-column correlations ($\phi$-coefficients) for a binary matrix.

Usage

phi.range(mat)

Arguments

mat
a binary matrix

Value

  • The range of the inter-column correlations

encoding

UTF-8

Examples

Run this code
ctr <- rsctrl(burn_in = 10, n_eff = 5, step=10, seed = 123, tfixed = FALSE)
mat <- matrix(sample(c(0,1), 50, replace = TRUE), nr = 10)
rso <- rsampler(mat, ctr)
rso_st <- rstats(rso,phi.range)
print(unlist(rso_st))

Run the code above in your browser using DataLab