Processing math: 100%
Skip to contents

Estimates the location and scaling parameters of the latent variables from existing survey data.

Usage

estimate_params(data, n_levels, skew = 0)

Arguments

data

survey data with columns representing individual items. Apart from this, data can be of almost any class such as "data.frame" "matrix" or "array".

n_levels

number of response categories, a vector or a number.

skew

marginal skewness of latent variables, defaults to 0.

Value

A table of estimated parameters for each latent variable.

Details

The relationship between the continuous random variable X and the discrete probability distribution pk, for k=1,,K, can be described by a system of non-linear equations: pk=FX(xk1ξω)FX(xkξω)for k=1,,K where:

FX

is the cumulative distribution function of X,

K

is the number of possible response categories,

xk

are the endpoints defining the boundaries of the response categories,

pk

is the probability of the k-th response category,

ξ

is the location parameter of X,

ω

is the scaling parameter of X.

The endpoints xk are calculated by discretizing a random variable Z with mean 0 and standard deviation 1 that follows the same distribution as X. By solving the above system of non-linear equations iteratively, we can find the parameters that best fit the observed discrete probability distribution pk.

The function estimate_params:

  • Computes the proportion table of the responses for each item.

  • Estimates the probabilities pk for each item.

  • Computes the estimates of ξ and ω for each item.

  • Combines the estimated parameters for all items into a table.

See also

discretize_density for details on calculating the endpoints, and part_bfi for example of the survey data.

Examples

data(part_bfi)
vars <- c("A1", "A2", "A3", "A4", "A5")
estimate_params(data = part_bfi[, vars], n_levels = 6)
#>          items
#> estimates         A1         A2         A3         A4         A5
#>      mean -0.9759824  1.0830781  0.9776057  1.1723519  0.9006478
#>      sd    1.1798137  0.7968668  0.8432599  1.3825407  0.8648150