Learn R Programming

simPop (version 2.1.3)

addWeights<-: Methods for function addWeights

Description

allows to modify sampling weights of an dataObj or simPopObj-object. As input the output of calibSample must be used.

Usage

addWeights(object) <- value

# S4 method for dataObj addWeights(object) <- value

# S4 method for simPopObj addWeights(object) <- value

Arguments

object

an object of class dataObj or simPopObj.

value

a numeric vector of suitable length

Examples

Run this code
data(eusilcS)
data(totalsRG)
if (FALSE) {
inp <- specifyInput(data=eusilcS, hhid="db030", hhsize="hsize", strata="db040", weight="db090")
## approx. 20 seconds ...
addWeights(inp) <- calibSample(inp, totalsRG)
}

Run the code above in your browser using DataLab