allotest: Bootstrap based test for testing an allometric model

Description Usage Arguments Details Value Author(s) References Examples

View source: R/allotest.R

Description

Bootstrap-based procedure that tests whether the data can be modelled by an allometric model.

Usage

1
2
allotest(formula, data, na.action = "na.omit", nboot = 500, seed = NULL,
  cluster = TRUE, ncores = NULL, test = "res", ...)

Arguments

formula

An object of class formula: a sympbolic description of the model to be fitted.

data

An optional data frame, matrix or list required by the formula. If not found in data, the variables are taken from environment(formula), typically the environment from which allotest is called.

na.action

A function which indicates what should happen when the data contain 'NA's. The default is 'na.omit'.

nboot

Number of bootstrap repeats.

seed

Seed to be used in the bootstrap procedure.

cluster

A logical value. If TRUE (default), the bootstrap procedure is parallelized (only for smooth = "splines"). Note that there are cases (e.g., a low number of bootstrap repetitions) that R will gain in performance through serial computation. R takes time to distribute tasks across the processors also it will need time for binding them all together later on. Therefore, if the time for distributing and gathering pieces together is greater than the time need for single-thread computing, it does not worth parallelize.

ncores

An integer value specifying the number of cores to be used in the parallelized procedure. If NULL (default), the number of cores to be used is equal to the number of cores of the machine - 1.

test

Statistic test to be used, based on residuals on the null model (res) or based on the likelihood ratio test using rss0 and rss1 lrt.

...

Other options.

Details

In order to facilitate the choice of a model appropriate to the data while at the same time endeavouring to minimise the loss of information, a bootstrap-based procedure, that test whether the data can be modelled by an allometric model, was developed. Therefore, allotest tests the null hypothesis of an allometric model taking into account the logarithm of the original variable (X^* = log(X) and Y^* = log(Y)).

Based on a general model of the type

Y^*=m(X^*)+\varepsilon

the aim here is to test the null hypothesis of an allometric model

H_0 = m(x^*) = a^*+ b^* x^*

vs. the general hypothesis H_1, with m being an unknown nonparametric function; or analogously,

H_1: m(x^*)= a^*+ b^* x^* + g(x^*)

with g(x^*) being an unknown function not equal to zero.

To implement this test we have used the wild bootstrap.

Value

An object is returned with the following elements:

statistic

the value of the test statistic.

value

the p-value of the test.

Author(s)

Marta Sestelo, Nora M. Villanueva and Javier Roca-Pardinas.

References

Sestelo, M. and Roca-Pardinas, J. (2011). A new approach to estimation of length-weight relationship of Pollicipes pollicipes (Gmelin, 1789) on the Atlantic coast of Galicia (Northwest Spain): some aspects of its biology and management. Journal of Shellfish Research, 30 (3), 939–948.

Sestelo, M. (2013). Development and computational implementation of estimation and inference methods in flexible regression models. Applications in Biology, Engineering and Environment. PhD Thesis, Department of Statistics and O.R. University of Vigo.

Examples

1
2
3
4
library(npregfast)
data(barnacle)
allotest(DW ~ RC, data = barnacle, nboot = 50, seed = 130853, 
cluster = FALSE)

npregfast documentation built on Nov. 17, 2017, 6:35 a.m.