selectSample: Select sample and returns the 'data.frame'

Description Usage Arguments Value

View source: R/selectSample.R

Description

Sample and outputs a data.frame with desired technique and size.

Usage

1
2
selectSample(data, stratum = NULL, method, size, seed,
  resample.data = NULL)

Arguments

data

The data.frame containing the population data.

stratum

A vector with strata variable names.

method

Select between srswr, srswor or systematic.

size

The size of sample. Must provide a vector if the sample is stratified.

seed

The seed for the random generator.

resample.data

A data frame used as pilot sample. Its useful to ignore the observations sampled before and to maintain the original fpc.

Value

A data.frame additionally with Prob and fpc columns. If the systematic method of selection has been chosen, returns the k and cumulated k also.


cgu-dados/auditsampling documentation built on March 24, 2021, 9:38 a.m.