Besides the configuration on this page, you can configure individual elements by using the
"Probabilities"-Element in the JSON configuration file. You can set the probability of missing
values for individual StudyEvents, Forms, ItemGroups and Items by using their OID. In case that
elements are reused, you can select them inside the specific context using a chain of OIDs:
{
"Probabilities": {
"Items": {
<ItemOID>: {
"ValueDistribution": {"1": 0.5, "2": 0.25, "3": 0.25},
"missingProbability": 0.42
},
<ItemOID>: {
"ValueDistribution": {"true": 0.75, "false": 0.25}
}
},
"ItemGroups": {
<ItemGroupOID>: {
"missingProbability": 0.5,
"repeat": {"Min": 8, "Max": 90},
"Items": {
<ItemOID>: {
"GaussianDistribution": {"mean": 3, "sigma": 1}
},
<ItemOID>: { /* ... */ }
}
},
<ItemGroupOID>: { /* ... */ }
},
"Forms": {
<FormOID>: {
"missingProbability": 0.5,
"repeat": {"Min": 8, "Max": 90},
"ItemGroups": {
<ItemGroupOID>: {
"missingProbability": 50,
"Items": {
<ItemOID>: {
"UniformDistribution": {"min": 0.0, "max": 1.0}
}
}
}
}
}
},
"StudyEvents": {
<StudyEventOID>: {
"missingProbability": 0.5,
"repeat": {"Min": 8, "Max": 90},
"Forms": {
<FormOID>: {
"missingProbability": 0.5,
"ItemGroups": {
<ItemGroupOID>: {
"missingProbability": 0.4,
"Items": {
<ItemOID>: {
"GaussianDistribution": {"mean": "2010-01-01", "sigma": "P2DT3H4M"},
"missingProbability": 0.5
},
<ItemOID>: {/* ... */}
}
}
}
},
<FormOID>: {/* ... */}
}
},
<StudyEventOID>: {/* ... */}
}
}
}
Distributions
To change the range of values generated for a specific item, you can use a distribution. Currently,
we support three types of distribution: The uniform distribution and gaussian
distribution, which are especially useful when dealing with numbers or dates, and the value
distribution, which comes very handy when dealing with a set of fixed codes.
A uniform distribution is specified by the minimal and maximal value. Please
remember, that a the range of allowed values of a specific item might be already constraint by
RangeChecks and Global Value domains.
"UniformDistribution": {"min": "2017-01-01", "max": "2019-01-02"}
The gaussian distribution is specified by its mean and its deviation. Please note,
that the mean value must be inside the range of allowed values.
"GaussianDistribution": {"mean": 1.0, "sigma": 0.5}
The value distribution allows the specification of specific probability for a
individual values:
"ValueDistribution": {"male": 0.45, "female": 0.45, "other": 0.05, "unknown": 0.05}
Because of limitations in the JSON format, you have to quote booleans and numbers. The value after
the colon represents the probability, that the given element will be chosen. Please make sure that
all probabilities of a value distribution sum up to 1.0.
Repeating elements
StudyEvents, Forms and ItemGroups can be specified as repeatable. In that case, the "Repeat key
settings" apply. If you want to set these for individual elements, you can specify a minimal and
maximal number of repetitions by using it's OID:
"repeat": {"Min": 10, "Max": 20}