estimate_params | R Documentation |
Estimates the location and scaling parameters of the latent variables from existing survey data.
estimate_params(data, n_levels, skew = 0)
data |
survey data with columns representing individual items.
Apart from this, |
n_levels |
number of response categories, a vector or a number. |
skew |
marginal skewness of latent variables, defaults to 0. |
The relationship between the continuous random variable X
and the
discrete probability distribution p_k
, for k = 1, \dots, K
,
can be described by a system of non-linear equations:
p_{k} = F_{X}\left( \frac{x_{k - 1} - \xi}{\omega} \right)
- F_{X}\left( \frac{x_{k} - \xi}{\omega} \right)
\quad \text{for} \ k = 1, \dots, K
where:
F_{X}
is the cumulative distribution function of X
,
K
is the number of possible response categories,
x_{k}
are the endpoints defining the boundaries of the response categories,
p_{k}
is the probability of the k
-th
response category,
\xi
is the location parameter of X
,
\omega
is the scaling parameter of X
.
The endpoints x_{k}
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 p_{k}
.
The function estimate_params
:
Computes the proportion table of the responses for each item.
Estimates the probabilities p_{k}
for each item.
Computes the estimates of \xi
and \omega
for each item.
Combines the estimated parameters for all items into a table.
A table of estimated parameters for each latent variable.
discretize_density
for details on calculating
the endpoints, and part_bfi
for example of the survey data.
data(part_bfi)
vars <- c("A1", "A2", "A3", "A4", "A5")
estimate_params(data = part_bfi[, vars], n_levels = 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.