Stepwise elimination of the non significant regression parameters. Possibility to assign a fixed value shape1
to the overall shape parameter.
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") )
A list of class 'stepSGB' with the following 5 components:
A list with the following components:
full
Object of class regSGB, same as obj0
, see regSGB
.
iter1
Object of class regSGB obtained at iteration 1.
...
iterk
Object of class regSGB obtained at iteration k.
The original formula, or NULL
Value of k, the last iteration.
Data frame with k+1
columns, overall results and k
iterations. The rows are
value
Log-likelihood
n.par
Total number of parameters (including the shape2 param.)
n.par.fixed
Number of fixed parameters.
AIC
Value of the AIC criterion.
convergence
0 if converged.
kkt1
1 if first Karush-Kuhn-Tucker criterion fulfilled, zero otherwise.
kkt2
1 if second Karush-Kuhn-Tucker criterion fulfilled, zero otherwise.
counts.function
Number of times the objective function (the log-likelihood) was evaluated.
counts.gradient
Number of times the gradient was evaluated. \
Arguments for calling stepSGB
.
object of class regSGB, see regSGB
.
data matrix of explanatory variables (without constant vector) \((n \times m)\); \(n\): sample size, \(m\): number of auxiliary variables.
data matrix of compositions (independent variables) \((n \times D)\); \(D\): number of parts.
vector of length \(n\); positive observation weights, default rep(1,n)
. Should be scaled to sum to \(n\).
positive number, initial value of the overall shape parameter, default obj0[["par"]][1].
inequality constraints on the estimates of shapes:
shape1*shape2[i] > bound, i=1,...,D.
By default bound = 2.1
, see InequalityConstr
.
fixed value of the overall shape parameter. Default is NULL (no fixed value).
logical, if TRUE (default), the initial shape2 parameters are each replaced by their average. See initpar.SGB
.
maximum number of iterations, i.e. attempts to set a parameter to 0.
list of control parameters for optim, see optim
. Default is from auglag
, except list(fnscale = -1)
. Always specify fnscale = -1
.
list of control parameters to be used by the outer loop in constrOptim.nl, see auglag
.
Default is from auglag
, except list(itmax = 1000, ilack.max = 200)
.
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
.
regSGB
, initpar.SGB
, auglag
.
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"]]
Run the code above in your browser using DataLab