Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plotD

Basic plot of dose group means


Description

Plot dose group means vs dose with options to connect points by lines, and include CI about each dose group mean based on within-group SDs

Usage

plotD(y, dose, baseline, se = TRUE, line = TRUE, 
    meansOnly=FALSE,sem=NULL,clev = 0.9, 
    xlab='Dose',ylab='Response', logScale=FALSE)

Arguments

y

Outcomes

dose

Doses corresponding to outcomes

baseline

If present, ANACOVA means are plotted, adjusted for baseline. Baseline is optional.

se

If T, plot CI for each dose group.

line

If T, dose group means are connected by a line

meansOnly

If T, y contains dose group means rather than individual observations. Baseline cannot be specified.

sem

If meansOnly and se=T, sem must contain the corresponding standard errors

clev

Level of CI for dose group means

xlab

Label for x-axis

ylab

Label for y-axis

logScale

If TRUE, log scale is used for dose.

Value

Returns a list with the ggplot object and two vectors with the dose group means and their standard errors.

Author(s)

Neal Thomas

See Also

Examples

data("metaData")
exdat<-metaData[metaData$taid==2 & metaData$etype==1,]
with(exdat,plotD(rslt,dose,meansOnly=TRUE,se=TRUE,sem=se,ylab=
"Y",xlab="Dose(mg)"))

clinDR

Simulation and Analysis Tools for Clinical Dose Response Modeling

v2.3.5
GPL (>= 2)
Authors
Neal Thomas [aut, cre] (<https://orcid.org/0000-0002-1915-8487>), Jing Wu [aut], Mike K. Smith [aut]
Initial release
2021-04-11

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.