Description Usage Arguments Details Value Author(s) Examples
This function gets variables (in rows) from the clipboard and outputs logic and calculation for eligibility.
1 2 | logic_elig(event = NULL, elin_spec = "elin_", elex_spec = "elex_",
sex_spec = "sex")
|
event |
NULL by default. Specify event (including square brackets), if field is used in events other than the event containing the eligibility criteria. |
elin_spec |
Specifier for inclusion criterion. 'elin_' by default. |
elex_spec |
Specifier for exclusion criterion. 'elex_' by default. |
sex_spec |
Specifier for variable sex to adapt logic for sex-specific eligibility criteria. 'sex' by default. Assumed coding is 1 = male, 2 = female. |
logic_elig() creates the branching logic and calculation from the clipboard input of eligibility variables. It creates branching logic for three cases: eligible, not eligible and eligibility criteria missing (incomplete). The calculation gives 0 = not eligible, 1 = eligible and 2 = eligibility criteria missing (incomplete). Variables that are not detected as eligiblity criteria are ignored. Eligibility variables are detected by the prefix, by default 'elin_' for inclusion criteria, 'elex_' for exclusion criteria. Furthermore, sex-specific eligibility criteria are detected by the string 'fem_' in the eligibility variables, e.g. 'elin_fem_' or 'elex_fem_'. The logic is then adapted for the sex-specific variables.
A 2 row-table with row 1 = header and row 2 = value is returned with the following headers and values,
* 'inc' : logic which is TRUE, when all eligibility criteria are fullfilled (inclusion criteria = yes and exclusion critera = no)
* 'out' : logic which is TRUE, when at least one eligibility criterion is not fullfilled (inclusion criterion = no or exclusion criterion = yes)
* 'mis' : logic which is TRUE, when at least one eligibility criterion is missing AND other eligibility criteria are fullfilled (if an eligibility criterion is not fullfilled, this is not TRUE)
* 'calc': calculation which gives values: 0= not eligible, 1 = eligible, 2 = missing
Michael Stoller <mstoller84@gmail.com> <michael.stoller@ctu.unibe.ch>
1 2 3 4 5 | ## Not run:
#Run function with specified event
logic_elig(event = "[eligibility]")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.