| stepSGB {SGB} | R Documentation |
Stepwise backward elimination for SGB regression
Description
Stepwise elimination of the non significant regression parameters. Possibility to assign a fixed value shape1 to the overall shape parameter.
Usage
stepSGB(obj0, d, u, weight = rep(1, dim(d)[1]), shape10 = obj0[["par"]][1],
bound = 2.1, shape1 = NULL, Mean2 = TRUE, maxiter = 10,
control.optim = list(fnscale = -1),
control.outer = list(itmax = 1000, ilack.max = 200, trace = TRUE,
kkt2.check = TRUE, method = "BFGS") )
Arguments
obj0 |
object of class regSGB, see |
d |
data matrix of explanatory variables (without constant vector) |
u |
data matrix of compositions (independent variables) |
weight |
vector of length |
shape10 |
positive number, initial value of the overall shape parameter, default obj0[["par"]][1]. |
bound |
inequality constraints on the estimates of shapes: |
shape1 |
fixed value of the overall shape parameter. Default is NULL (no fixed value). |
Mean2 |
logical, if TRUE (default), the initial shape2 parameters are each replaced by their average. See |
maxiter |
maximum number of iterations, i.e. attempts to set a parameter to 0. |
control.optim |
list of control parameters for optim, see |
control.outer |
list of control parameters to be used by the outer loop in constrOptim.nl, see |
Details
This is an experimental procedure for searching a set of non-significant parameters that will be set to zero. The shape parameters are excluded from the elimination procedure. The algorithm starts with obj0, output of regSGB. The p-values for the regression parameters in summary(obj0) are taken in decreasing order. The parameter with the largest p-value is set to zero and regSGB computes the regression with this constraint. If the AIC value is smaller than the AIC in obj0, the parameter with the next largest p-value in obj0 is set to zero and the regression with the two constraints is computed. The process iterates until either a larger AIC is found or maxiter is attained.
The initial value of the overall shape parameter is set to the estimated value in the full model obj0. The other initial values are computed as in regSGB.
There is the possibility to fix the value of the overvall shape parameter, if shape1 is given a positive number a_0 (default NULL, no fixed value).
If regSGB was called without Formula, the data-frame with auxiliary variables for stepSGB follows the same rules as for the initial regSGB object, see Example 1 in regSGB.
Value
A list of class 'stepSGB' with the following 5 components:
reg |
A list with the following components: |
Formula |
The original formula, or NULL |
iter |
Value of k, the last iteration. |
tab |
Data frame with |
call |
Arguments for calling |
References
vignette("SGB regression", package = "SGB")
See Also
Examples
data(carseg)
## Extract the compositions
uc <- as.matrix(carseg[,(1:5)])
## Initial regression
data(ocar)
step_ocar <- stepSGB(ocar, carseg, uc, bound=2.1, control.outer=list(trace=FALSE))
summary(step_ocar[["reg"]][["full"]])
summary(step_ocar[["reg"]][["iter4"]])
step_ocar[["tab"]]