View source: R/generateProbs.r
generateProbs | R Documentation |
Generate vector of selection or inclusion probabilities
generateProbs(x, probType, verbose = FALSE)
x |
RDBES data object |
probType |
"selection" or "inclusion" for selection and inclusion probabilities respectively |
verbose |
(Optional) Set to TRUE if you want informative text printed out, or FALSE if you don't. The default is FALSE. |
When the selection method is SRSWR selection probabilities are
calculated as 1 / N
and inclusion probabilities as
1 - (1 - 1 / N)^n
. When the selection method is SRSWOR selection
probabilities are not currently implemented. Inclusion probabilities are
calculated as n/N
. When the selection method is CENSUS both types of
probabilities are set to 1. Probabilities for selection methods UPSWR and
UPSWOR are not calculated (they need to be supplied by the user). The same
happens with regards to non-probabilistic methods
A vector or probabilities
## Not run:
generateProbs(x = Pckg_SDAResources_agstrat_H1[["VS"]], probType = ("inclusion"))
# population size
a<-generateProbs(x = Pckg_SDAResources_agstrat_H1[["VS"]], probType = ("inclusion"))
sum(1/a$VSincProb)
# returns error
generateProbs(x = Pckg_SDAResources_agstrat_H1[["VS"]], probType = ("selection"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.