R/augmentation_functions.R
HDtweedie_kfold_aug.Rd
Fits a penalized gamma augmentation model via cross fitting and returns vector of length n of out of sample predictions on the link scale from cross fitting
HDtweedie_kfold_aug( x, y, trt, wts = NULL, K = 10, p = 1.5, interactions = FALSE )
x | an n x p matrix of covariates for the zero part data, where each row is an observation and each column is a predictor. MUST be ordered such that the first n_s rows align with the observations in x_s and s |
---|---|
y | a length n vector of responses taking positive values |
trt | a length n vector of treatment variables with 1 indicating treatment and -1 indicating control |
wts | a length n vector of sample weights |
K | number of folds for cross fitting |
p | tweedie mixing parameter. See |
interactions | boolean variable of whether or not to fit model with interactions. For predictions, interactions will be integrated out |