dist_weight_boot: Perform a bootstrap likelihood ratio test on a scalescape...

View source: R/dist_weight_boot.R

dist_weight_bootR Documentation

Perform a bootstrap likelihood ratio test on a scalescape object

Description

dist_weight_boot conducts a parametric bootstrap test of the null hypothesis that one or more of the landscape predictors in a model fit using dist_weight has no effect on the response variable.

Usage

dist_weight_boot(
  mod.full,
  mod.reduced,
  nboot = 2000,
  plot.fits = TRUE,
  verbose = FALSE,
  pb.flag = TRUE,
  n.breaks = NULL,
  optim.method = "L-BFGS-B",
  lower = NULL,
  upper = NULL,
  n.partition = 10,
  data = NULL
)

Arguments

mod.full

a scalescape object; the landscape model fitted by dist_weight.

mod.reduced

the corresponding "local" model object, without landscape variables.

nboot

the number of bootstraps. To determine whether a variable is significant at the alpha level 0.05, nboot=2000 should be used (default).

plot.fits

produce histograms of the bootstrapped range and deviance values (default = TRUE).

verbose

produce output for each iteration of the bootstrap (default = FALSE)

pb.flag

show a progress bar for completion of the bootstraps (default = TRUE)

n.breaks

specify...

optim.method

specify method for optimization (default = "L-BFGS-B"). See optim().

lower

lower bound on the variables for the "L-BFGS-B" method. See optim().

upper

upper bound on the variables for the "L-BFGS-B" method. See optim().

n.partition

number of partitions to divide the log-likelihood profile, in order to avoid identifying false maxima.

data

a data frame with local and landscape predictors and response variables. By default, this is extracted from mod.full.

Details

dist_weight_boot simulates datasets using the attributes and parameter values from the model specified with dist_weight() and then re-fits the full and reduced models to all the datasets using optim() to maximize the range parameter with each iteration. It then compares them to test the null hypothesis that the reduced model fits better than the full model, producing a p-value for the effect of the additional parameters in the full model on the response. Although dist_weight produces p-values for the regression coefficients, these p-values are conditional on the estimate of the range parameter, and consequently they will likely have inflated type I error rates. By bootstrapping, dist_weight_boot accounts for the co-dependence of regression coefficient and range parameter. Therefore, p-values reported for landscape predictor(s) should come from dist_weight_boot rather than dist_weight.

Value

dist_weight_boot returns an object of class scalescape.boot. This is a list containing the following:

  • mod.full the full model

  • mod.reduced the reduced model

  • dev the deviance value of the full vs. reduced model

  • mean.dev the mean deviance value of the bootstraps

  • sd.dev the standard deviation of the bootstrap deviance values

  • P the P value for the bootstrap likelihood ratio test

  • logLik.values a data frame of log-likelihood and deviance values for each iteration of the bootstrap

  • coef a data frame of coefficient values for each iteration of the bootstrap


benjaminiuliano/scalescape documentation built on April 4, 2022, 1:51 p.m.