Description Usage Arguments Details Value Author(s) References See Also Examples
Creates the matrix of all candidate regressors for a linearization of a generalized linear model.
1 2 |
formula |
the formula of the linear part of the model. The rules for creating the formula are standard for R but: 1) the formula must not contain the dependent variable (it is one-sided); 2) the |
theta0 |
the |
glm.model |
the type of the generalized linear model. Available models are |
lower |
the |
upper |
the |
n.levels |
the |
echo |
Print the call of the function? |
For mathematical details, see the referenced paper.
The n
times m
matrix of all candidate regressors of a generalized linear regression model linearized in theta0
.
Radoslav Harman, Lenka Filova
Atkinson AC, Woods DC (2015). Designs for generalized linear models. Handbook of Design and Analysis of Experiments, 471-514.
Fx_cube, Fx_simplex, Fx_blocks, Fx_survival, Fx_dose
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | # The logistic model with second-order predictors x1, x2 in [-1,1]
# discretized into 21 points and theta0=c(1, 2, 2, -1, -1.5, 1.5)
form.quad <- ~ x1 + x2 + I(x1*x2) + I(x1^2) + I(x2^2)
Fx <- Fx_glm(form.quad, c(1, 2, 2, -1, -1.5, 1.5),
glm.model="bin-logit", n.levels=c(21,21))
# The locally D-optimal approximate design
w <- od_REX(Fx)$w.best
Fx.lin <- Fx_cube(form.quad, n.levels=c(21,21)) # Just for the plot
od_plot(Fx, w, Fx.lin[, 2:3], dd.size=2)
## Not run:
#The GLM with Poisson link and 2 linear predictors x1,x2 in [-1,1]
# discretized into 21 points and theta0=c(0,2,2)
Fx <- Fx_glm(~x1+x2, c(0, 2, 2), glm.model="Poisson-log", n.levels=c(21, 21))
# The locally D-optimal exact design of size 50 without replications
w <- od_KL(Fx, 50, bin=TRUE, t.max=5)$w.best
Fx.lin <- Fx_cube(~x1+x2, n.levels=c(21, 21))
od_plot(Fx, w, Fx.lin[, 2:3], w.lim=Inf)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.