PlotPriorFits {bkmr} | R Documentation |
Plot of exposure-response function from univariate KMR fit
Description
Plot the estimated h(z[m])
estimated from frequentist KMR for r[m]
fixed to specific values
Usage
PlotPriorFits(
y,
X,
Z,
fits,
which.z = NULL,
which.q = NULL,
plot.resid = TRUE,
ylim = NULL,
...
)
Arguments
y |
a vector of outcome data of length |
X |
an |
Z |
an |
fits |
output from |
which.z |
which predictors (columns in |
which.q |
which q.values to plot; defaults to all possible |
plot.resid |
whether to plot the data points |
ylim |
plotting limits for the y-axis |
... |
other plotting arguments |
Value
No return value, generates plot
Examples
## First generate dataset
set.seed(111)
dat <- SimData(n = 50, M = 4)
y <- dat$y
Z <- dat$Z
X <- dat$X
priorfits <- InvestigatePrior(y = y, Z = Z, X = X, q.seq = c(2, 1/2, 1/4, 1/16))
PlotPriorFits(y = y, Z = Z, X = X, fits = priorfits)
[Package bkmr version 0.2.2 Index]