ContCI: Confidence intervals and standard errors of multiple...

Description Usage Arguments Details Value Examples

View source: R/ContCI.R

Description

This function will calculate confidence intervals and standard errors from the responses of multiple imputed datasets for a specified continuous variable, and also give a YES/NO indicator for whether or not the observed value is within the confidence interval. The confidence intervals and standard errors are calculated by first taking the means of the variable from the partially synthesized datasets, then using t.test() to get the confidence intervals.

Usage

1
ContCI(obs_data, imp_data_list, var, sig = 6, alpha = 0.05)

Arguments

obs_data

The original dataset to which the next will be compared, of the type "data.frame".

imp_data_list

A list composed of m synthetic data sets.

var

The continuous variable being checked.

sig

The number of significant digits in the output data frame. Defaults to 6.

alpha

Test size, defaults to 0.05.

Details

This function was developed with the intention of making the job of researching partially synthetic data utility a bit easier by providing another way of measuring utility.

Value

This function returns a data frame with the variable's observed mean, lower and upper limits of the confidence interval, standard error, and a YES/NO indicating whether or not the observed value is within the confidence interval.

Examples

1
2
3
4
5
6
#"PPA" is the observed data set
#"PPAm5" is a list of 5 partially synthetic data sets derived from PPA
#"age" is a continuous variable present in the synthesized data sets.
#3 significant digits are desired from the output data frame.

ContCI(PPA, PPAm5, "age", sig=3)

SynthTools documentation built on March 13, 2020, 1:33 a.m.