Skip to contents

Performs a parametric bootstrap to test the significance of a linear trend in time under the assumption of autoregressive order 1 error.

Usage

fit_real_data(dataSet, nBootSims = 499, printFig = F)

Arguments

dataSet

Data frame. Two of the fields must be named x (time, equally spaced), and y (response variable)

nBootSims

Numeric scalar. Number of bootstrap samples to perform

printFig

Boolean. Print data an fit in figure window (Default = F)

Value

A list containing:

null

Fitted model under the null hypothesis (no trend)

alt

Fitted model under the alternative hypothesis (with trend)

pValue

p-value from the bootstrap test

pValChi2

p-value from the chi-squared approximation

data

The input data set

ecodata

This function is used in ecodata::geom_lm()