Description Usage Arguments Value
View source: R/lopt nonmyop.R View source: R/lopt_nonmyop.R
Assuming the currrent response, future covariate value and future treatment, Calculate objective function if horizon is 1. If horizon >1, iterate back to cr.exp.loss function.
1 2 | cr.future.loss(z.next, t.next, zp, N, design, k, beta, y, cr, wr, prior.scale,
bayes, dyn = NULL, Nprobs = NULL, ...)
|
z.next |
vector of covariate values for future unit |
t.next |
treatment of future unit |
zp |
vector of probabilities for each level of covariate z (needs to in the same order as all.z below) |
N |
natural number greater than 0 for horizon |
design |
design matrix constructed for all units up until the current unit |
k |
number of covariates |
beta |
vector of current estimates for regression coefficients |
y |
vectir of responses generated up until current unit |
cr |
matrix of contrasts |
wr |
matrix of weights |
prior.scale |
prior scale parameter |
bayes |
set to T if bayesglm is used instead of glm. Default prior assumed |
dyn |
set to NULL of there are no dynamic covariates, set to T if there are dynamic covariates |
Nprobs |
a counter to be used if there are dynamic covariates |
... |
further arguments to be passed to <lossfunc> |
value of objective function assuming current response, future covariate value and future treatment
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.