WeightsCalSF {Frames2} | R Documentation |
g-weights for the SF calibration estimator
Description
Computes the g-weights for the SF calibration estimator.
Usage
WeightsCalSF(ysA, ysB, pi_A, pi_B, pik_ab_B, pik_ba_A, domains_A, domains_B,
N_A = NULL, N_B = NULL, N_ab = NULL, xsAFrameA = NULL, xsBFrameA = NULL,
xsAFrameB = NULL, xsBFrameB = NULL, xsT = NULL, XA = NULL, XB = NULL, X = NULL,
met = "linear")
Arguments
ysA |
A numeric vector of length |
ysB |
A numeric vector of length |
pi_A |
A numeric vector of length |
pi_B |
A numeric vector of length |
pik_ab_B |
A numeric vector of size |
pik_ba_A |
A numeric vector of size |
domains_A |
A character vector of size |
domains_B |
A character vector of size |
N_A |
(Optional) A numeric value indicating the size of frame A |
N_B |
(Optional) A numeric value indicating the size of frame B |
N_ab |
(Optional) A numeric value indicating the size of the overlap domain |
xsAFrameA |
(Optional) A numeric vector of length |
xsBFrameA |
(Optional) A numeric vector of length |
xsAFrameB |
(Optional) A numeric vector of length |
xsBFrameB |
(Optional) A numeric vector of length |
xsT |
(Optional) A numeric vector of length |
XA |
(Optional) A numeric value or vector of length |
XB |
(Optional) A numeric value or vector of length |
X |
(Optional) A numeric value or vector of length |
met |
(Optional) A character vector indicating the distance that must be used in calibration process. Possible values are "linear", "raking" and "logit". Default is "linear". |
Details
Function provides g-weights in following scenarios:
There is not any additional auxiliary variable
-
N_A, N_B
andN_{ab}
unknown -
N_{ab}
known andN_A
andN_B
unknown -
N_A
andN_B
known andN_{ab}
unknown -
N_A, N_B
andN_{ab}
known
-
At least, one additional auxiliary variable is available
-
N_{ab}
known andN_A
andN_B
unknown -
N_A
andN_B
known andN_{ab}
unknown -
N_A, N_B
andN_{ab}
known
-
Value
A numeric vector containing the g-weights for the SF calibration estimator.
References
Ranalli, M. G., Arcos, A., Rueda, M. and Teodoro, A. (2013) Calibration estimationn in dual frame surveys. arXiv:1312.0761 [stat.ME]
Deville, J. C., S\"arndal, C. E. (1992) Calibration estimators in survey sampling. Journal of the American Statistical Association, 87, 376 - 382
Examples
data(DatA)
data(DatB)
data(PiklA)
data(PiklB)
#Let calculate g-weights for the SF calibration estimator for variable Clothing,
#without considering any auxiliary information
WeightsCalSF(DatA$Clo, DatB$Clo, PiklA, PiklB, DatA$ProbB, DatB$ProbA,
DatA$Domain, DatB$Domain)
#Now, let calculate g-weights for the SF calibration estimator for variable Leisure
#when the frame sizes and the overlap domain size are known
WeightsCalSF(DatA$Lei, DatB$Lei, PiklA, PiklB, DatA$ProbB, DatB$ProbA,
DatA$Domain, DatB$Domain, N_A = 1735, N_B = 1191, N_ab = 601)
#Finally, let calculate g-weights for the SF calibration estimator
#for variable Feeding, considering Income and Metres2 as auxiliary
#variables and with frame sizes and overlap domain size known.
WeightsCalSF(DatA$Feed, DatB$Feed, PiklA, PiklB, DatA$ProbB, DatB$ProbA,
DatA$Domain, DatB$Domain, N_A = 1735, N_B = 1191, N_ab = 601, xsAFrameA = DatA$Inc,
xsBFrameA = DatB$Inc, xsAFrameB = DatA$M2, xsBFrameB = DatB$M2,
XA = 4300260, XB = 176553)