This function finds the best psi value recursively
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | find_optimum_rec(
data,
outcome,
exposure,
confounder,
id,
upper_bound_psi,
upper_bound_beta,
upper_se = 0,
lower_bound_psi,
lower_bound_beta,
lower_se = 0,
number_it,
max_number_it,
epsilon,
method,
corstr = "\"independence\"",
verbose = TRUE
)
|
data |
data frame with patients |
outcome |
outcome string |
exposure |
exposure string |
confounder |
list of confounders |
id |
id variable |
upper_bound_psi |
double, upper bound psi |
lower_bound_psi |
double, lower bound psi |
number_it |
number of iteration (current) |
max_number_it |
number max iterations |
epsilon |
target epsilon |
corstr |
a character string specifying the correlation structure. The following are permitted: '"independence"', '"exchangeable"', '"ar1"', '"unstructured"' and '"userdefined"' |
verbose |
boolean for printing |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.