lundi 5 octobre 2020

survey package in R: How to set fpc argument (finite population correction)

I have sampled some data from a sampling frame using the probability proportional to size (PPS) plan such that I have sampled 6 strata on combination of two variables: gender and pre with proportions:

      pre
gender  High   Low Medium
     F 0.155 0.155  0.195
     M 0.155 0.155  0.185

Now I want to specify the design of my sampled data using svydesign from R package "survey". I was wondering how to define the fpc (finite population correction) argument?

The documentation says:

For PPS sampling without replacement it is necessary to specify the probabilities for each stage of sampling using the fpc argument, and an overall weight argument should not be given.

library(survey)

out <- read.csv('https://raw.githubusercontent.com/rnorouzian/d/master/out.csv')

dstrat <- svydesign(id=~1,strata=~gender+pre, data=out, pps = "brewer", fpc = ????)



Aucun commentaire:

Enregistrer un commentaire