Package 'nlrr'

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

Help Index


Lipid and diabetes

Description

This data set gives the simulated data for lipid, age, gender, and diabetes.

Usage

Lipid

Format

A data frame containing 2000 observations.

Source

simulated

References

Not applicable


Odds ratio plot for dose - response non-linear continuous exposure.

Description

Calculates non-linear odds ratio and plot OR vs. a continuous variable.

Usage

nlor(outcome, exposure, covar = NULL, ref = NULL, knum = 4, data)

Arguments

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

Examples

sum1 <- nlor('dm', 'lipid', covar = c('age', 'gender'), 0.6, data = Lipid)
head(sum1)

Odds ratio plot for dose - response non-linear continuous exposure.

Description

Calculates non-linear odds ratio and plot OR vs. a continuous variable.

Usage

nlorplot(exposure, or, data, xlab = NULL)

Arguments

exposure

the exposure variable

or

odds ratio

data

name of a dataset

xlab

x-axis

Examples

sum1 <- nlor('dm', 'lipid', covar = c('age', 'gender'), 0.6, data = Lipid)
head(sum1)
nlorplot('lipid', 'or', data = sum1, xlab = 'Lipid')