R/revisit_rand.R
revisit_rand.Rd
Create a revisit design for a survey that specifies the panels and time
periods that will be sampled by random selection of panels and time periods.
Three options for random assignments are "period"
where the number of time
periods to be sampled in a panel is fixed, "panel"
where the number panels to
be sampled in a time period is fixed, and "none"
where the number of
panel-period combinations is fixed.
revisit_rand(
n_period,
n_pnl,
rand_control = "period",
n_visit,
nsamp,
panel_name = "Random",
begin = 1,
skip = 1
)
Number of time periods for the survey design. Typically, number of periods if sampling occurs once per period or number of months if sampling occurs once per month. (v, number of varieties (or treatments) in BIBD terms)
Number of panels
Character value must be "none"
, "panel"
, or "period"
.
Specifies whether the number of sample events will be fixed for each panel
("panel"
), for each sample occasion ("occasion"
), or for total panel-period
combinations ("none"
). Default is "panel"
.
If rand_control
is "panel"
, this is the number of panels that
will be sampled in each time period. If rand_control is "period"
, this is
the number of time periods to be sampled in each panel. If rand_control
is
"none"
, this is the total number of panel-period combinations that will
have units sampled in the revisit design.
Number of samples in each panel.
Prefix for name of each panel
Numeric name of first sampling occasion, e.g. a specific period.
Number of sampling occasions to skip between planned sampling
periods, e.g., sampling will occur only every 5 periods if skip = 5
.
A two-dimensional array of sample sizes to be sampled for each panel and each time period.
The revisit design for a survey is created by random selection of panels and time periods that will have sample events. The number of sample occasions that will be visited by a panel is random.
revisit_bibd
create a balanced incomplete block panel revisit design
revisit_dsgn
create a panel revisit design
pd_summary
to summarize characteristics of a panel revisit design
revisit_rand(
n_period = 20, n_pnl = 10, rand_control = "none", n_visit = 50,
nsamp = 20
)
#> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#> Random_01 0 0 0 20 20 0 0 0 0 0 0 0 0 20 0 20 0 20 0 0
#> Random_02 0 0 0 0 0 20 0 0 0 0 0 20 0 0 0 0 20 0 0 0
#> Random_03 0 20 0 20 20 0 0 0 0 20 20 0 0 0 0 20 20 0 0 0
#> Random_04 0 20 0 0 20 0 0 0 20 0 20 0 0 0 0 0 0 20 0 0
#> Random_05 20 20 0 0 0 20 0 0 0 20 0 20 0 0 0 20 20 20 0 0
#> Random_06 0 0 20 0 0 0 0 20 0 0 0 0 0 20 0 0 0 20 0 0
#> Random_07 20 0 20 0 0 0 0 0 0 0 0 20 0 0 0 0 0 20 0 0
#> Random_08 20 0 0 20 0 20 0 0 0 0 0 0 0 0 0 20 0 20 0 20
#> Random_09 0 0 0 20 0 0 0 0 0 0 0 0 0 20 0 0 0 0 0 0
#> Random_10 0 0 20 0 0 0 0 0 0 20 0 20 0 20 0 20 0 20 0 0
#> attr(,"class")
#> [1] "paneldesign"
revisit_rand(
n_period = 20, n_pnl = 10, rand_control = "panel", n_visit = 5,
nsamp = 10
)
#> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#> Random_01 10 0 10 0 0 0 10 0 10 0 0 10 0 0 0 0 0 0 0 0
#> Random_02 0 0 0 0 0 0 0 10 0 10 0 0 10 10 10 0 0 0 0 0
#> Random_03 0 10 10 0 0 10 0 0 0 0 0 0 0 0 10 0 0 0 0 10
#> Random_04 0 10 0 0 0 10 0 10 10 0 0 10 0 0 0 0 0 0 0 0
#> Random_05 10 10 0 0 0 0 0 0 0 0 0 0 10 10 0 0 0 0 0 10
#> Random_06 0 10 0 10 0 0 0 10 0 0 10 10 0 0 0 0 0 0 0 0
#> Random_07 0 0 10 10 0 10 0 0 0 0 10 10 0 0 0 0 0 0 0 0
#> Random_08 0 0 0 0 10 10 10 10 0 0 0 0 0 0 0 0 0 0 10 0
#> Random_09 0 10 0 0 10 0 10 0 10 0 0 0 0 10 0 0 0 0 0 0
#> Random_10 0 0 0 0 0 0 0 10 0 10 0 0 0 10 0 0 0 0 10 10
#> attr(,"class")
#> [1] "paneldesign"
revisit_rand(
n_period = 20, n_pnl = 10, rand_control = "period",
n_visit = 5, nsamp = 10
)
#> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#> Random_01 0 10 0 10 0 0 10 10 10 0 0 10 10 10 10 10 10 10 0 10
#> Random_02 0 10 0 0 0 10 0 0 0 10 10 0 10 10 10 0 0 0 10 0
#> Random_03 10 10 0 0 0 10 10 10 0 0 10 10 10 0 0 10 0 10 0 10
#> Random_04 10 0 10 10 10 10 10 0 10 10 0 10 0 10 0 0 10 0 10 10
#> Random_05 10 0 0 10 10 10 10 10 0 0 0 0 10 0 10 10 0 0 0 10
#> Random_06 10 0 10 10 10 0 10 10 10 0 10 0 0 0 10 0 10 10 0 0
#> Random_07 0 0 0 0 10 0 0 0 0 10 10 0 0 10 0 0 0 10 10 0
#> Random_08 0 0 10 0 10 10 0 0 0 10 0 0 0 0 0 10 10 0 10 10
#> Random_09 10 10 10 10 0 0 0 10 10 0 0 10 10 0 0 0 0 0 10 0
#> Random_10 0 10 10 0 0 0 0 0 10 10 10 10 0 10 10 10 10 10 0 0
#> attr(,"class")
#> [1] "paneldesign"