View source: R/adjust_target.R
adjust_target | R Documentation |
Title Generate covariates' residuals
adjust_target(X, y1, y2 = NULL, cor_vars)
X |
A dataset containing y1, y2, and covariates. The row name is the name of x,y and covariate |
y1 |
If cross lagged analysis is used between x and y, 'y1' is the name of x. |
y2 |
y2 can be NULL. If cross lagged analysis is used between x and y, 'y2' is the name of y. 'y1' and 'y2' come from the same time point. |
cor_vars |
the name of covariate |
a list containing the covariate-adjusted value of y1 and y2 (If y2 is not NULL)
data(test_data1)
result <- adjust_target(X=test_data1,y1="ASI",y2=NULL,cor_vars=c("HDL_C","LDL_C"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.