Arguments
formula
The regression formula (e.g. income ~ employment + old.turnover if income is survey variable and employment and old.turnover are auxiliary variables).
surveydata
A data frame of the survey data including the variables in formula, piwt (inverse probability of selection) and gregwt (generalized regression estimator weight).
historical.reweight
A set of reweighting factors for use when a historical dataset is being used.
It reweights from the historical sample to the sample of interest.
The default value of 1 should be used if the sample being used for optimising Q is the
same sample (or at least the same design) as the sample to which the winsorizing cutoffs are to be applied.
groupname
The variable of this name in surveydata defines the groups for which Q is to be optimised.
If groupname is missing, it is assumed that cutoffs are to be optimised for the overall mean or total.
estimated.means.name
The variable of this name in surveydata should contain an estimator of the expected values for each sample value of the variable of interest.
If set to "", the regression model is estimated using IRLS.
stop
Set to T to open a browser window (for debugging purposes)