GenAugData | R Documentation |
Generate augmented data from coordinating site and localized models. Calculate OOB prediction for coordinating site data on its model and common prediction on other models.
GenAugData(coord_id, coord_df, fit_lst, covars)
coord_id |
Index of coordinating site. |
coord_df |
Data of coordinating site ('data.table'). |
fit_lst |
A list of localized models. |
covars |
A vector of covariate names used. |
Augmented data generated from the coordinating site and localized models.
K <- 4
df_lst <- list()
fit_lst <- list()
for (k in 1:K) {
df <- GenSimData(k)
df_lst[[k]] <- df
covars <- grep("^X", names(df), value=TRUE)
fit_lst[[k]] <- grf::causal_forest(X=as.matrix(df[, covars, with=FALSE]), Y=df$Y, W=df$Z)
}
coord_id <- 1
coord_df <- df_lst[[coord_id]]
GenAugData(coord_id, coord_df, fit_lst, covars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.