syn: Generate synthetic data

Description Usage Arguments Details Value Author(s) See Also Examples

Description

This function synthesize a given data under the assumptions of a given model

Usage

1
2
syn(model, data, keep.pars = keep(model), students = ncol(data$R), n = 1,
  progress = FALSE)

Arguments

model

a character string indicates which model governs the synthesizing process.

data

a list contains data that needs to be synthesized, first component is the response matrix, the other components are additional information that the specified model requires.

keep.pars

a character string vector contains names of the parameters to be kept after learning the most probable context from data, by default this parameter is set by values indicated in vector KEEP.

students

number of students in the synthetic data, by default this number is kept.

n

number of synthetic dataset(s) to generate.

progress

a boolean value indicates if the generating steps should be printed or not.

Details

This function is essentially a wrapper of function learn and gen, where in between it eliminates all parameters that are not indicated in keep.pars in the learned context. you are also given the option of changing the number of students.

Value

a list with two components, first component is identical to argument data, second is a context or a list of contexts that have been generated.

Author(s)

Hoang-Trieu Trinh, thtrieu@apcs.vn

See Also

learn, gen, KEEP

Examples

1
2
3
# Let us make up some data to synthesize
dina.data <- gen('dina', pars(students = 20, concepts = 4, items = 5))$dina
dina.syn <- syn('dina', data = dina.data, students = 50, n = 10)

thtrieu/edmsyn documentation built on May 31, 2019, 11:18 a.m.