View source: R/PAF_calc_continuous.R
print.PAF_q | R Documentation |
Print out PAF_q for differing risk factors
## S3 method for class 'PAF_q'
print(x, ...)
x |
A PAF_q object. |
... |
Other arguments to be passed to print |
No return value, prints the PAF_q object to the console.
library(splines)
library(survival)
library(parallel)
options(boot.parallel="snow")
options(boot.ncpus=2)
# The above could be set to the number of available cores on the machine
model_continuous <- glm(formula = case ~ region * ns(age, df = 5) +
sex * ns(age, df = 5) + education +exercise + ns(diet, df = 3) +
alcohol + stress + ns(lipids,df = 3) + ns(waist_hip_ratio, df = 3) +
high_blood_pressure, family = "binomial", data = stroke_reduced)
out <- PAF_calc_continuous(model_continuous,
riskfactor_vec=c("diet","lipids","waist_hip_ratio"),
q_vec=c(0.01, 0.1,0.3,0.5,0.7,0.9),ci=FALSE,calculation_method="B",
data=stroke_reduced)
print(out)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.