Calculates the power for trend detection for one or more variables, for one or more panel designs, for one or more linear trends, and for one or more significance levels. The panel designs create a covariance model where the model includes variance components for units, periods, the interaction of units and periods, and the residual (or index) variance.
power_dsgn(
ind_names,
ind_values,
unit_var,
period_var,
unitperiod_var,
index_var,
unit_rho = 1,
period_rho = 0,
paneldsgn,
nrepeats = NULL,
trend_type = "mean",
ind_pct = NULL,
ind_tail = NULL,
trend = 2,
alpha = 0.05
)
Vector of indicator names
Vector of indicator mean values
Vector of variance component estimates for unit variability for the indicators
Vector of variance component estimates for period variability for the indicators
Vector of variance component estimates for unit by period interaction variability for the indicators
Vector of variance component estimates for index (residual) error for the indicators
Correlation across units. Default is 1
.
Correlation across periods. Default is 0
.
A list of panel designs each as a matrix. Each element of
the list is a matrix with dimnames
(dimensions: number of panels (rows) by
number of periods (columns)) containing the number of units visited for
each combination of panel and period. Dimnames for columns must be
able to be coerced into an integer (e.g., 2016). All designs must span the same
number of periods. Typically, the panel designs are the output of the
function revisit_dsgn
.
Either NULL
or a list of matrices the same length as
paneldsgn
specifying the number of revisits made to units in a panel in the
same period for each design. Specifying NULL
indicates that number of
revisits to units is the same for all panels and for all periods and for
all panel designs. The default is NULL
, a single visit. Names must match
list names in paneldsgn
.
Trend type is either "mean"
where trend is applied as
percent trend in the indicator mean or "percent"
where the trend is applied
as percent trend in the proportion (percent) of the distribution that is
below or above a fixed value. Default is trend_type="mean"
When trend_type
is equal to "percent"
, a vector of the
values of the indicator fixed value that defines the percent. Default is
NULL
When trend_type is equal to "percent"
, a character vector
with values of either "lower"
or "upper"
for each indicator. "lower"
states that the percent is associated with the lower tail of the
distribution and "upper"
states that the percent is associated with the
upper tail of the distribution. Default is NULL
.
Single value or vector of assumed percent change from
initial value in the indicator for each period. Assumes the trend is
expressed as percent per period. Note that the trend may be either positive
or negative. The default is 2
.
Single value or vector of significance level for linear
trend test, alpha, Type I error, level. The default is 0.05
.
A list with components trend_type
, ind_pct
, ind_tail
, trend values
across periods, periods (all periods included in one or more panel
designs), significance levels, a five-dimensional array of power
calculations (dimensions: panel, design names, periods, indicator names,
trend names, alpha_names
), an array of indicator mean values for each trend
and the function call.
Calculates the power for detecting a change in the mean for different panel design structures. The model incorporates unit, period, unit by period, and index variance components as well as correlation across units and across periods. See references for methods.
Urquhart, N. S., W. S. Overton, et al. (1993) Comparing sampling designs for monitoring ecological status and trends: impact of temporal patterns. In: Statistics for the Environment. V. Barnett and K. F. Turkman. John Wiley & Sons, New York, pp. 71-86.
Urquhart, N. S. and T. M. Kincaid (1999). Designs for detecting trends from repeated surveys of ecological resources. Journal of Agricultural, Biological, and Environmental Statistics, 4(4), 404-414.
Urquhart, N. S. (2012). The role of monitoring design in detecting trend in long-term ecological monitoring studies. In: Design and Analysis of Long-term Ecological Monitoring Studies. R. A. Gitzen, J. J. Millspaugh, A. B. Cooper, and D. S. Licht (eds.). Cambridge University Press, New York, pp. 151-173.
ppd_plot
to plot power curves for panel designs
# Power for rotating panel with sample size 60
power_dsgn("Variable_Name",
ind_values = 43, unit_var = 280, period_var = 4,
unitperiod_var = 40, index_var = 90, unit_rho = 1, period_rho = 0,
paneldsgn = list(NoR60 = revisit_dsgn(20,
panels = list(NoR60 = list(
n = 60, pnl_dsgn = c(1, NA),
pnl_n = NA, start_option = "None"
)), begin = 1
)),
nrepeats = NULL, trend_type = "mean", trend = 1.0, alpha = 0.05
)
#> $design
#> [1] "NoR60"
#>
#> $period
#> [1] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#>
#> $indicator
#> [1] "Variable_Name"
#>
#> $trend
#> [1] 1
#>
#> $alpha
#> [1] 0.05
#>
#> $trend_type
#> [1] "mean"
#>
#> $trend_change
#> , , Variable_Name
#>
#> 1 2 3 4 5 6 7 8 9 10 11 12
#> Trend_1% 43 43.43 43.86 44.29 44.72 45.15 45.58 46.01 46.44 46.87 47.3 47.73
#> 13 14 15 16 17 18 19 20
#> Trend_1% 48.16 48.59 49.02 49.45 49.88 50.31 50.74 51.17
#>
#>
#> $dsgn_power
#> , , Variable_Name, Trend_1%, alpha_0.05
#>
#> 1 2 3 4 5 6 7
#> NoR60 0.05 0.05097814 0.05391947 0.05983234 0.06977159 0.0848596 0.10629
#> 8 9 10 11 12 13 14
#> NoR60 0.1352933 0.1730432 0.2204875 0.2781082 0.345641 0.4218213 0.5042486
#> 15 16 17 18 19 20
#> NoR60 0.589462 0.6732835 0.7514024 0.8200819 0.8767933 0.9205846
#>
#>
#> $call
#> power_dsgn("Variable_Name", ind_values = 43, unit_var = 280,
#> period_var = 4, unitperiod_var = 40, index_var = 90, unit_rho = 1,
#> period_rho = 0, paneldsgn = list(NoR60 = revisit_dsgn(20,
#> panels = list(NoR60 = list(n = 60, pnl_dsgn = c(1, NA),
#> pnl_n = NA, start_option = "None")), begin = 1)),
#> nrepeats = NULL, trend_type = "mean", trend = 1, alpha = 0.05)
#>
#> attr(,"class")
#> [1] "powerpaneldesign"