Description Usage Arguments Details Value Author(s)
View source: R/cond_imp_logistic.R
Given the imputation parameters, this function imputes the scores using their distribution conditional on the observed values of the curves and the response variable. In the case of logistic regression, this essentially means that imputation is performed separately within each group of the response variable. Muliple or mean imputation can be chosen.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
dat |
An n \times 4 data frame (where N is the number of subjects, each with m_i observations, so that ∑_{i=1}^N m_i = n) expected to have variables 'X','y','subj', and 'argvals'. |
workGrid |
A vector of the unique desired grid points on which to evaluate the function. The length of this vector will be called M. |
nimps |
An integer specifying the number of desired imputations, if |
seed |
A numeric value used to set the seed for reproducibility (useful for multiple imputation). |
impute_type |
A string used to choose between mean and multiple imputation. Should be one of "Mean" or "Multiple". |
mu0 |
A numeric vector of length |
mu1 |
A numeric vector of length |
var_delt |
A number representing σ^2_δ, the variance of the noise. |
Cx |
An M \times M matrix for the covariance function of X, evaluated at |
phi |
An M \times J matrix whose columns are the J eigenfunctions of C_X, each evaluate at |
lam |
A length-J numeric vector containing the eigenvalues of C_X. |
tol |
A (small) numerical value that sets the tolerance for trimming the eigenvalues of the conditional covariance. |
The variables of dat
should be specified as follows: 'X' specifies the observed values of the curves
(no missing values here); 'y' should be a vector of 1's and 0's such that the values of 'y' are the same for each subject;
'subj' should contain unique numeric identifiers for each subject, and 'argvals' should indicate the time point at which
each observation was made (note that these values should be a subset of workGrid
).
Either a N\times J matrix of imputed scores if impute_type
is set to "Mean", or a 3-dimensional array
of dimension N\times J\times nimps if impute_type
is set to "Multiple".
Jusitn Petrovich, jpetrovich02@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.