generateRandomJk1Zones {eatRep} | R Documentation |
Generates random jackknife-1 zones based on sampling units in the data set.
Description
Function adds randomly generated jackknife-1 zones to the data.
Usage
generateRandomJk1Zones (datL, unit, nZones, name = "randomCluster")
Arguments
datL |
Data frame containing at least the primary sampling unit variable |
unit |
Variable name or column number of the primary sampling unit (i.e. student or class identifier |
nZones |
integer: number of jackknife zones. Note: The umber of jackknife zones must not exceed the number of distinct sampling units |
name |
New name of the jackknife-zone variable in the data set |
Value
The original data with an additional column of the jackknife-zone variable
Examples
data(lsa)
### We only consider year 2010
lsa10<- lsa[which(lsa[,"year"] == 2010),]
lsa10<- generateRandomJk1Zones(datL = lsa10, unit="idclass", nZones = 50)
[Package eatRep version 0.14.7 Index]