RCT_predict
resultsR/rct-predict-S3.R
predict.bmbstats_RCT_predict.Rd
S3 method for predicting RCT_predict
results
# S3 method for bmbstats_RCT_predict predict(object, newdata, ...)
object | Object of class "bmbstats_RCT_predict" |
---|---|
newdata | Data used for prediction |
... | Extra arguments forwarded to |
data("vertical_jump_data") m1 <- cv_model( `Post-test` ~ `Pre-test` + Group, vertical_jump_data, control = model_control( cv_repeats = 10, cv_folds = 3, cv_strata = vertical_jump_data$Group ) )#>#>m1_rct <- RCT_predict( m1, new_data = vertical_jump_data, outcome = "Post-test", group = "Group", treatment_label = "Treatment", control_label = "Control" ) predict(m1_rct, vertical_jump_data)#> 1 2 3 4 5 6 7 8 #> 42.04167 46.07303 43.80419 48.37440 40.74050 41.81824 45.08679 43.79421 #> 9 10 11 12 13 14 15 16 #> 42.05525 37.62593 36.63302 39.88062 39.16084 38.80457 36.85273 45.78745 #> 17 18 19 20 21 22 23 24 #> 51.88463 53.65842 46.60804 48.75083 55.12834 51.90657 45.03811 53.59372 #> 25 26 27 28 29 30 #> 50.07579 56.24927 45.73852 48.51731 52.31447 54.41558