Description Usage Arguments Author(s) Examples
View source: R/input_to_beat.2st_2.R
Prepares the design file for two-stage sample design on the basis of a dataset containin information on each PSU
1 | input_to_beat.2st_2(psu,psu_id,stratum_var,mos_var,delta,minimum)
|
psu |
Dataframe containing information on each PSU. |
psu_id |
Identifier of each PSU in PSU dataframe. |
stratum_var |
Identifier of stratum in PSU dataframe. |
mos_var |
Variable containing the number of selection units in each PSU. |
delta |
Average number of final number of SSU per each selection unit. |
minimum |
Minimum number of selection units to be interviewed in each PSU. |
Giulio Barcaroli
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ## Not run:
# psu <- read.csv2("psu.csv") # Read the external file containing PSU information
load("R2BEAT_ReGenesees.RData") # ReGenesees design and calibration objects plus PSU data
head(psu)
psu_id="municipality" # Identifier of the PSU
stratum_var="stratum" # Identifier of the stratum
mos_var="ind" # Variable to be used as 'measure of size'
delta=1 # Average number of SSUs for each selection unit
minimum <- 50 # Minimum number of SSUs to be selected in each PSU
inp2 <- input_to_beat.2st_2(psu,
psu_id,
stratum_var,
mos_var,
delta,
minimum)
head(inp2$psu_file)
head(inp2$des_file)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.