Learn R Programming

synthpop (version 1.2-1)

syn.polyreg: Synthesis by unordered polytomous regression

Description

Generates a synthetic categorical variable using unordered polytomous regression (without or with bootstrap).

Usage

syn.polyreg(y, x, xp, proper = FALSE, maxit = 100, trace = FALSE, MaxNWts = 10000, ...)

Arguments

y
an original data vector of length n.
x
a matrix (n x p) of original covariates.
xp
a matrix (k x p) of synthesised covariates.
proper
for proper synthesis (proper = TRUE) a multinomial model is fitted to a bootstrapped sample of the original data.
maxit
the maximum number of iterations for nnet.
trace
switch for tracing optimization for nnet.
MaxNWts
the maximum allowable number of weights for nnet.
...
additional parameters passed to nnet.

Value

k with synthetic values of y.

Details

Generates synthetic categorical variables by the polytomous regression model. The method consists of the following steps:
  1. Fit categorical response as a multinomial model.
  2. Compute predicted categories.
  3. Add appropriate noise to predictions.

The algorithm of syn.polyreg uses the function multinom from the nnet package.

In order to avoid bias due to perfect prediction, the data are augmented by the method of White, Daniel and Royston (2010).

References

White, I.R., Daniel, R. and Royston, P. (2010). Avoiding bias due to perfect prediction in multiple imputation of incomplete categorical variables. Computational Statistics and Data Analysis, 54, 2267--2275.

See Also

syn, syn.polr, multinom, polr