Learn R Programming

robcat (version 0.1.0)

initialize_param: Neutral initialization of starting values

Description

Initializes starting values for numerical optimization in a neutral way. The optimization problem itself is convex, so the initialization should not matter much.

Usage

initialize_param(x, y)

Value

A vector of initial values for the polychoric correlation coefficient, the X-threshold parameters, and the Y-threshold parameters

Arguments

x

Vector of integer-valued responses to first rating variable, or contingency table (a table object).

y

Vector of integer-valued responses to second rating variable; only required if x is not a contingency table.

Examples

Run this code
## example data
set.seed(123)
x <- sample(c(1,2,3), size = 100, replace = TRUE)
y <- sample(c(1,2,3), size = 100, replace = TRUE)
initialize_param(x, y)

Run the code above in your browser using DataLab