Description Usage Arguments Details Examples
Default synthetisation parameters based on variable names
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | Sparameters.default.f(
ref.table,
asis = NULL,
notpredictor = NULL,
variables = Sparameters.variables.reorder.default(names(ref.table)),
predictors.matrix = predictor.matrix.default(variables)[!is.element(variables, asis),
!is.element(variables, notpredictor)],
splittingvar = NULL,
moresplits = NULL,
preferredmethod = "ctree",
splithreshold = 100,
defaultsynparameters = list(smoothing = "none", importance = TRUE, keep.forest = TRUE,
minbucket = 30)
)
|
ref.table |
a dataframe |
asis |
a vector of character strings, indicating which variables to keep as is. |
notpredictor |
a vector of character strings, indicating which variables are not supposed to be used as predictors. |
variables |
a vector of character strings, indicating the variables to synthesize. Order is important. |
predictors.matrix |
a predictor matrix. Number of rows is the number of variables to synthesize, number of columns is all the variables from ref.table |
moresplits |
an object of class moresplist (not defined yet) |
preferredmethod: |
"rf" for random forest or "ctree" for classification tree |
defaultparameters |
a list indicating default parameters for synthpop synthesisation functions, for example ntree=5, smoothing="none" |
creates default synthetisation parameters Some rules: parents variable are potential predictors of their children, synthetisation is conditional to missingindicators, synthetisation is conditional to presence in cell
1 2 3 4 5 6 7 | data(TtableA)
ATtableA<-augmentT_f(TtableA,variablespct="AA.cont1",variablesmax="AA.present")
ref.table<-ATtableA
Spa<-Sparameters.default.f(ref.table=ATtableA)
names(Spa)<-lapply(Spa,function(x){x$variable})
Spa$AA.present_La_Lb
Spa$AA.cont1_La_Lb
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.