Title: | Non-Linear Relative Risk Estimation and Plotting |
---|---|
Description: | Estimate the non-linear odds ratio and plot it against a continuous exposure. |
Authors: | Yiqiang Zhan [aut, cre] |
Maintainer: | Yiqiang Zhan <[email protected]> |
License: | GPL (>= 2) |
Version: | 0.1 |
Built: | 2025-02-14 04:41:46 UTC |
Source: | https://github.com/cran/nlrr |
This data set gives the simulated data for lipid, age, gender, and diabetes.
Lipid
Lipid
A data frame containing 2000 observations.
simulated
Not applicable
Calculates non-linear odds ratio and plot OR vs. a continuous variable.
nlor(outcome, exposure, covar = NULL, ref = NULL, knum = 4, data)
nlor(outcome, exposure, covar = NULL, ref = NULL, knum = 4, data)
outcome |
the outcome variable |
exposure |
the exposure variable |
covar |
a covariats list |
ref |
reference value for the continuous variable |
knum |
number of knots |
data |
name of a dataset |
sum1 <- nlor('dm', 'lipid', covar = c('age', 'gender'), 0.6, data = Lipid) head(sum1)
sum1 <- nlor('dm', 'lipid', covar = c('age', 'gender'), 0.6, data = Lipid) head(sum1)
Calculates non-linear odds ratio and plot OR vs. a continuous variable.
nlorplot(exposure, or, data, xlab = NULL)
nlorplot(exposure, or, data, xlab = NULL)
exposure |
the exposure variable |
or |
odds ratio |
data |
name of a dataset |
xlab |
x-axis |
sum1 <- nlor('dm', 'lipid', covar = c('age', 'gender'), 0.6, data = Lipid) head(sum1) nlorplot('lipid', 'or', data = sum1, xlab = 'Lipid')
sum1 <- nlor('dm', 'lipid', covar = c('age', 'gender'), 0.6, data = Lipid) head(sum1) nlorplot('lipid', 'or', data = sum1, xlab = 'Lipid')