Description Usage Arguments Details Value Author(s) Examples
Nonparametric bootstrap of the polywog
regression procedure.
Can be run on a fitted model of class "polywog"
, or within the
original procedure via the boot
argument. The function
control.bp
can be used to pass options to bootPolywog
when
bootstrapping within polywog
.
1 2 3 4 5 6 7 8  bootPolywog(model, nboot = 100, .parallel = FALSE, reuse.lambda = FALSE,
reuse.penwt = FALSE, nlambda = 100, lambda.min.ratio = 1e04,
nfolds = 10, thresh = NULL, maxit = NULL, maxtries = 1000,
min.prop = 0, report = FALSE, .matrixOnly = FALSE)
control.bp(.parallel = FALSE, reuse.lambda = FALSE, reuse.penwt = FALSE,
nlambda = 100, lambda.min.ratio = 1e04, nfolds = 10, thresh = NULL,
maxit = NULL, maxtries = 1000, min.prop = 0, report = FALSE)

model 
a fitted model of class 
nboot 
number of bootstrap iterations. 
.parallel 
logical: whether to perform computations in parallel
using a backend registered with 
reuse.lambda 
logical: whether to use the penalization parameter from
the original fit ( 
reuse.penwt 
logical: whether to use the penalty weights from the
original fit ( 
nlambda 
number of values of the penalty factor to examine in
crossvalidation, as in 
lambda.min.ratio 
ratio of the smallest value of the penalty factor
to the largest, as in 
nfolds 
number of crossvalidation folds to use. 
thresh 
convergence threshold, as in 
maxit 
iteration limit for fitting, as in 
maxtries 
maximum number of attempts to generate a bootstrap sample with a noncollinear model matrix (often problematic with lopsided binary regressors) before stopping and issuing an error message. 
min.prop 
for models with a binary response variable, minimum proportion of
nonmodal outcome to ensure is included in each bootstrap iteration (for
example, set 
report 
logical: whether to print a status bar. Not available if

.matrixOnly 
logical: whether to return just the matrix of bootstrap
coefficients ( 
Parallel computation via the .parallel
argument requires
registation of a backend for %dopar%
, as
in polywog
. In the case of bootPolywog
, bootstrap
fitting is carried out in parallel, while crossvalidation to choose the
penalization factor (assuming reuse.lambda = FALSE
) is carried
out sequentially within each iteration.
If .matrixOnly = FALSE
, the returned object is model
with the bootstrap matrix included as its boot.matrix
element. If
.matrixOnly = TRUE
, just the matrix is returned. In either case, the
bootstrap matrix is a sparse matrix of class
"dgCMatrix"
.
Brenton Kenkel and Curtis S. Signorino
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37  ## Using occupational prestige data
data(Prestige, package = "carData")
Prestige < transform(Prestige, income = income / 1000)
## Fit a polywog model without bootstrapping
## (note: using low convergence threshold to shorten computation time of the
## example, *not* recommended in practice!)
fit1 < polywog(prestige ~ education + income + type,
data = Prestige,
degree = 2,
thresh = 1e4)
summary(fit1)
## Bootstrap the fitted model
fit2 < bootPolywog(fit1, nboot = 5)
summary(fit2)
## Example of parallel processing on Mac/Unix via 'doMC'
## Not run:
library(doMC)
registerDoMC()
fit2 < bootPolywog(fit1, nboot = 100, .parallel = TRUE)
## End(Not run)
## Example of parallel processing on Windows via 'doSMP'
## Not run:
library(doSMP)
w < startWorkers()
registerDoSMP(w)
fit2 < bootPolywog(fit1, nboot = 100, .parallel = TRUE)
stopWorkers(w)
## End(Not run)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.