Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

multinom.synds

Fitting multinomial models to synthetic data


Description

Fits multinomial models to the synthesised data set(s) using the multinom function.

Usage

multinom.synds(formula, data,  ...)

Arguments

formula

a symbolic description of the model to be estimated. A typical model has the form response ~ predictors. See the documentation of multinom and formula for details.

data

an object of class synds, which stands for 'synthesised data set'. It is typically created by function syn and it includes data$m synthesised data set(s).

...

additional parameters passed to multinom.

Value

To print the results the print function (print.fit.synds) can be used. The summary function (summary.fit.synds) can be used to obtain the combined results of models fitted to each of the m synthetic data sets.

An object of class fit.synds. It is a list with the following components:

call

the original call to multinom.synds.

mcoefavg

combined (average) coefficient estimates.

mvaravg

combined (average) variance estimates of mcoef.

analyses

an object summarising the fit to each synthetic data set or a list of m such objects. Note that this is different from the object created by summary.multinom to make it compatible with other fitting methods. In particular the coefficients are vectors, not matrices.

fitting.function

function used to fit the model.

n

a number of cases in the original data.

k

a number of cases in the synthesised data.

proper

a logical value indicating whether synthetic data were generated using proper synthesis.

m

the number of synthetic versions of the observed data.

method

a vector of synthesising methods applied to each variable in the saved synthesised data.

incomplete

a logical value indicating whether any of the variables in the model were not synthesised.

mcoef

a matrix of coefficients estimates from all m syntheses.

mvar

a matrix of variance estimates from all m syntheses.

See Also

Examples

ods <- SD2011[1:1000, c("sex", "age", "edu", "marital", "ls", "smoke")]
s1 <- syn(ods, m = 3)
f1 <- multinom.synds(edu  ~ sex + age, data = s1)
summary(f1)
print(f1, msel = 1:2)
compare(f1, ods)

synthpop

Generating Synthetic Versions of Sensitive Microdata for Statistical Disclosure Control

v1.6-0
GPL-2 | GPL-3
Authors
Beata Nowok [aut, cre], Gillian M Raab [aut], Chris Dibben [ctb], Joshua Snoke [ctb], Caspar van Lissa [ctb]
Initial release
2020-09-03

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.