Used to compare performance of sample designweighted and unweighted estimation procedures.
1 2 3 4 5 
clustering 
Boolean input on whether want population generated from clusters of covariance
parameters. Defaults to 
two_stage 
Boolean input on whether want two stage sampling, with first stage defining set
of 
theta 
A numeric vector of global covariance parameters in the case of 
M 
Scalar input denoting number of clusters to employ if 
theta_star 
An P x M matrix of cluster location values associated with the choice of

gp_type 
Input of choice for covariance matrix formulation to be used to generate the functions
for the 
N 
A scalar input denoting the number of population units (or establishments). 
T 
A scalar input denoting the number of time points in each of 
L 
A scalar input that denotes the number of blocks in which to assign the population
units to be subsampled in the first stage of sampling.
Defaults to 
R 
A scalar input that denotes the number of blocks to sample from 
I 
A scalar input denoting the number of strata to form within each block. Population units
are divided into equallysized strata based on variance quantiles. Defaults to 
n 
Sample size to be generated. Both an informative sample under either single
( 
noise_to_signal 
A numeric input in the interval, 
incl_gradient 
A character input on whether stratum probabilities from lowesttohighest
is to 
A list object named dat_sim
containing objects related to the generated sample
finite population, the informative sample and the noninformative, iid, sample.
Some important objects, include:
H 
A vector of length 
map.tot 
A 
map.obs 
A 
map.iid 
A 
(y,bb) 
N x T 
(y_obs,bb_obs) 
N x T 
(y_iid,bb_iid) 
N x T 
Terrance Savitsky tds151@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30  ## Not run:
library(growfunctions)
## use gen_informative_sample() to generate an
## N X T population drawn from a dependent GP
## By default, 3 clusters are used to generate
## the population.
## A single stage stratified random sample of size n
## is drawn from the population using I = 4 strata.
## The resulting sample is informative in that the
## distribution for this sample is
## different from the population from which
## it was drawn because the strata inclusion
## probabilities are proportional to a feature
## of the response, y (in the case, the variance.
## The stratified random sample oversamples
## large variance strata).
## (The user may also select a 2stage
## sample with the first stage
## sampling "blocks" of the population and
## the second stage sampling strata within blocks).
dat_sim < gen_informative_sample(N = 10000,
n = 500, T = 10,
noise_to_signal = 0.1)
## extract n x T observed sample under informative
## stratified sampling design.
y_obs < dat_sim$y_obs
T < ncol(y_obs)
## End(Not run)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.