Description Usage Arguments Value
Calculate constants independent of delta in MLE and REMLE likelihoods
1 | get_constants(Y, X)
|
Y |
Matrix with individuals as rows and measurements as columns Missing measurements must be NA. |
X |
Matrix with |
A list of named constants. These constants are difficult to
describe briefly. See Jew et al, 2020 for a more in-depth
discussion of these constants. ns
is the total number of
measured responses. nt
is the number of contexts.
ni
is the number of individuals. nc
is the number
of covariates. ntc
is the number of measurement contexts
multiplied by the number of covariates. g.sizes
is a vector
of the unique number of measurements across all individuals.
g.ind.sizes
is a vector of the number of individuals
that have a certain number of measurements. B
is a dummy
matrix that will store the inverse of XHX (beta hat covariance).
D
and E
are vector representations of the upper
triangle of symmetric matrices that are used to calculate B
.
sxy
is a vector of the sum of responses multiplied by each
covariate within each context. gxsy
is a matrix where each
row represents a group and column represents the sum of the
covariate in each context multiplied by the sum of responses for
each individual. sy2
is the sum of squared responses.
syi2g
provides the sum of squared responses within each
group of measurement numbers.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.