object$m>1
)
combining rules are applied. Analysis-specific utility measures are used to
evaluate differences between synthetic and observed data.
"compare"(object, data, plot = "Z", return.result = TRUE, return.plot = TRUE, plot.intercept = FALSE, lwd = 1, lty = 1, lcol = c("#1A3C5A","#4187BF"), dodge.height = .5, point.size = 2.5, partly = FALSE, ...)
"print"(x, ...)
"Z"
(Z scores) or "coef"
(coefficients).ggplot
.compare.fit.synds
.compare.fit.synds
which is a list with the
following components:
Beta
), their standard errors (se(Beta)
)
and Z scores (Z
).B.syn
), standard errors of those estimates (se(B.syn)
),
estimates of the observed standard errors (se(Beta).syn
), Z scores
estimates (Z.syn
) and their standard errors (se(Z.syn)
).
Note that se(B.syn)
and se(Z.syn)
give the standard errors
of the mean of the m
syntheses and can be made very small by
increasing m
.ggplot
of the the coefficients with confidence
intervals for models based on observed and synthetic data.return.result
was set to FALSE
then coef.obs
,
coef.obs
, coef.diff
and ci.overlap
are all NULL
.
If return.plot
was set to FALSE
, ci.plot
is NULL
.
B.syn
and Z.syn
) should
not differ from the estimates from the observed data (Beta
and
Z
) by more than would be expected from the standard errors
(se(B.syn)
and se(Z.syn)
).
summary.fit.synds
ods <- SD2011[,c("sex","age","edu","smoke")]
s1 <- syn(ods, m = 5)
f1 <- glm.synds(smoke ~ sex + age + edu, data = s1, family = "binomial")
compare(f1, ods)
compare(f1, ods, plot = "coef")
Run the code above in your browser using DataLab