linear2ph {sleev} | R Documentation |
Sieve maximum likelihood estimator (SMLE) for two-phase linear regression problems
Description
Performs efficient semiparametric estimation for general two-phase measurement error models when there are errors in both the outcome and covariates. See pacakge vigenette for code examples.
Usage
linear2ph(
y_unval = NULL,
y = NULL,
x_unval = NULL,
x = NULL,
z = NULL,
data = NULL,
hn_scale = 1,
se = TRUE,
tol = 1e-04,
max_iter = 1000,
verbose = FALSE
)
Arguments
y_unval |
Column name of the error-prone or unvalidated continuous outcome. Subjects with missing values of |
y |
Column name that stores the validated value of |
x_unval |
Specifies the columns of the error-prone covariates. Subjects with missing values of |
x |
Specifies the columns that store the validated values of |
z |
Specifies the columns of the accurately measured covariates. Subjects with missing values of |
data |
Specifies the name of the dataset. This argument is required. |
hn_scale |
Specifies the scale of the perturbation constant in the variance estimation. For example, if |
se |
If |
tol |
Specifies the convergence criterion in the EM algorithm. The default value is |
max_iter |
Maximum number of iterations in the EM algorithm. The default number is |
verbose |
If |
Details
Models for linear2ph()
are specified through the arguments. The dataset input should at least contain columns for unvalidated error-prone outcome, validated error-prone outcome,
unvalidated error-prone covariate(s), validated error-prone covariate(s), and B-spline basis. B-spline basis can be generated from splines::bs()
function, with argument x
being the unvalidated error-prone covariate(s). See vignette for options in tuning the B-spline basis.
Value
linear2ph()
returns an object of class "linear2ph"
. The function coef()
is used to obtain the coefficients of the fitted model. The function summary()
is used to obtain and print a summary of results.
An object of class "linear2ph"
is a list containing at least the following components:
call |
the matched call. |
coefficients |
A named vector of the linear regression coefficient estimates. |
sigma |
The residual standard error. |
covariance |
The covariance matrix of the linear regression coefficient estimates. |
converge |
In parameter estimation, if the EM algorithm converges, then |
converge_cov |
In variance estimation, if the EM algorithm converges, then |
References
Tao, R., Mercaldo, N. D., Haneuse, S., Maronge, J. M., Rathouz, P. J., Heagerty, P. J., & Schildcrout, J. S. (2021). Two-wave two-phase outcome-dependent sampling designs, with applications to longitudinal binary data. Statistics in Medicine, 40(8), 1863–1876. https://doi.org/10.1002/sim.8876
See Also
cv_linear2ph()
to calculate the average predicted log likelihood of this function.
Examples
## Not run:
# Regression model: CD4 ~ VL + Sex. CD4 and VL are partially validated.
data("mock.vccc")
sn <- 20
data.linear <- spline2ph(x = "VL_unval", data = mock.vccc, size = sn,
degree = 3, group = "Sex")
res_linear <- linear2ph(y_unval = "CD4_unval", y = "CD4_val",
x_unval = "VL_unval", x = "VL_val",
z = "Sex", data = data.linear, hn_scale = 1,
se = TRUE, tol = 1e-04, max_iter = 1000,
verbose = FALSE)
## End(Not run)