Supplement 1. R code for illustrating that standard linear regression is not valid for testing random walk null hypotheses for autoregressive time series.
收藏DataCite Commons2020-09-03 更新2024-07-25 收录
下载链接:
https://wiley.figshare.com/articles/dataset/Supplement_1_R_code_for_illustrating_that_standard_linear_regression_is_not_valid_for_testing_random_walk_null_hypotheses_for_autoregressive_time_series_/3529796
下载链接
链接失效反馈官方服务:
资源简介:
File List deValpine_etal_invasions_supplement_randomWalkCode.R Description This code illustrates an aspect of time-series analysis that has been recognized for a long time but may be unfamiliar to some readers. The null hypothesis of no density-dependence in a population time-series, often called a random walk, can be represented as no relationship between log abundance at one time and the difference in log abundance from that time to the next time. However, the standard linear regression test of the hypothesis of a zero slope between two variables is not valid for testing the null hypothesis of a random walk in a time series. The code provided here uses simulations to illustrate that using standard linear regression to attempt to test a random walk null hypothesis leads to an incorrect probability of rejecting the null hypothesis even when it is true, i.e., Type I error rate. This code is provided for educational purposes. deValpine_etal_invasions_supplement_randomWalkCode.R contains annotated code comparing valid use of a linear regression hypothesis test to invalid use of such a test for a random walk null hypothesis for a time-series.
文件列表:deValpine_etal_invasions_supplement_randomWalkCode.R
描述 本代码阐释了时间序列分析中一个早已被学界认知,但部分读者可能尚不熟悉的议题。种群时间序列中不存在密度依赖(density-dependence)的原假设,通常被称为随机游走(random walk),可表述为:某一时刻的对数丰度,与该时刻到下一时刻的对数丰度差值之间不存在关联。然而,针对两变量间斜率为零的假设所采用的标准线性回归检验,并不适用于检验时间序列中随机游走的原假设。本代码通过模拟实验展示:即便原假设为真,使用标准线性回归检验随机游走原假设时,仍会得到错误的拒绝原假设概率,即I类错误率(Type I error rate)。本代码仅供教学使用。deValpine_etal_invasions_supplement_randomWalkCode.R 包含带注释的代码,对比了时间序列随机游走原假设检验中,线性回归假设检验的合法使用方式与非法使用方式。
提供机构:
Wiley
创建时间:
2016-08-05



