powertrend: Power Analysis For Detecting Trends

View source: R/powertrend.R

powertrendR Documentation

Power Analysis For Detecting Trends

Description

Power analysis for detecting trends in linear regression is implemented following procedures in Gerrodette (1987; 1991).

Usage

powertrend(trend = 1, A1 = NULL, PSE = NULL, pserel = 1,
 maxyrs = 3, pR = 100, step = 5, alpha = 0.05, tail = 2, graph = TRUE)

Arguments

trend

1 = Linear, 2 = Exponential. Default = 1.

A1

the start year abundance. In actuality, it can be population size, productivity, diversity, mortality rate, etc.

PSE

the proportional standard error (SE(A)/A) = CV in Gerrodette (1987;1991).

pserel

the relationship between abundance and PSE: 1 = 1/sqrt(A1), 2 = constant, 3 = sqrt(A1). Default = 1.

maxyrs

the maximum number of samples or years to project start year abundance. Default = 3.

pR

the highest positive percent change to investigate. Default = 100.

step

the increment of the range of percent change to investigate. Default = 5.

alpha

the alpha level (Type I error) to use. Default = 0.05.

tail

type of tailed test: 1 = one-tailed, 2= two-tailed. Default = 2.

graph

logical specifying whether a graph of power versus percent change should be produced. Default is TRUE.

Details

The probability that an upward or downward trend in abundance (power) will be detected is calculated using linear regression given number of samples (maxyrs), estimates of sample variability (PSE) and abundance-PSE relationship (pserel), and percent rate of change. The program calculates power for each step increment beginning at -100 percent for declining changes and ending at pR percent for increasing changes. See Gerrodette (1987;1991) for full details. It is assumed that time intervals between samplings is equal.

Value

Dataframe containing columns of number of samples (years), trend selected (trend), the PSE (pse), alpha level (alpha), tail of test (tail), percent change (R) over maxyrs, and power (power).

Author(s)

Gary A. Nelson, Massachusetts Division of Marine Fisheries gary.nelson@mass.gov

References

Gerrodette, T. 1987. A power analysis for detecting trends. Ecology. 68(5): 1364-1372.

Gerrodette, T. 1991. Models for power of detecting trends - a reply to Link and Hatfield. Ecology 72(5): 1889-1892.

Examples

powertrend(A1=1000,PSE=0.1)

fishmethods documentation built on April 27, 2023, 9:10 a.m.