Learn R Programming

jocre (version 0.3.3)

helpers: Different generic functions for classes

Description

Generic functions for summarising and plotting objects of class JOC or JOCMV.

Usage

# S3 method for JOC
plot(x, equi=log(c(0.8, 1.25)), axnames=NULL, main=NULL, xlim=log(c(0.77, 1.3)),
     ylim=log(c(0.77, 1.3)), col="black", convexify=FALSE, …)

# S3 method for JOC print(x, digits=max(3, getOption("digits") - 4), …)

# S3 method for JOC summary(object, digits=max(3, getOption("digits") - 4), …)

# S3 method for JOCMV plot(x, axnames=NULL, main=NULL, xlim=NULL, ylim=NULL, col="black", …)

# S3 method for JOCMV print(x, digits=max(3, getOption("digits") - 4), …)

# S3 method for JOCMV summary(object, digits=max(3, getOption("digits") - 4), …)

Arguments

x
An output object of class JOC or JOCMV.
object
An output object of class JOC or JOCMV.
digits
A numeric value giving the number of significant digits to be printed.
equi
A numeric vector of length 2 specifying the equivalence region (lower and upper equivalence threshold) to be shaded in grey. When set to NULL no equivalence region is drawn. Default is log(c(0.8, 1.25)).
axnames
A vector of two character strings giving the x and y axis labels. For plot.JOC, when set to NULL the column names of dat are used as axis labels. Default is NULL.
main
A character string giving the plot title. Default is NULL.
xlim
A numeric vector of length two specifying the plotting range on the x-axis. Default is log(c(0.77, 1.3)) for plot.JOC and NULL for plot.JOCMV.
ylim
A numeric vector of length two specifying the plotting range on the y-axis. Default is log(c(0.77, 1.3)) for plot.JOC and NULL for plot.JOCMV.
col
A character string specifying the colour of the plotted region or intervals.
convexify
A logical specifying whether the convex hull around a non-convex region should be plotted instead of the region itself. Ignored unless method="limacon.fin" or method="limacon.asy" for the JOC object. Default is FALSE.
Further plotting arguments to be passed to methods. Type ?plot for details.

Value

An on-screen summary or graphical display.

Details

print and summary summarise the estimates and confidence set boundaries of an object of class JOC or JOCMV that was created with cset or csetMV, respectively. plot displays a (simultaneous) confidence region or intervals when applied to an object of class JOC or JOCMV.

References

Philip Pallmann & Thomas Jaki (2017) Simultaneous confidence regions and intervals for multivariate bioequivalence. Submitted to Statistics in Medicine.

See Also

cset and csetMV for computing (simultaneous) confidence regions and intervals.

Examples

Run this code
## Not run: ------------------------------------
# # Example 1: simultaneous 90% confidence region for bivariate data
# 
# bivar <- mvtnorm::rmvnorm(n=100, mean=rep(0.05, 2), sigma=diag(2) * 0.05)
# 
# hotelling <- cset(dat=bivar, method="hotelling", alpha=0.1)
# summary(hotelling)
# plot(hotelling, main="90% Hotelling Region")
# 
# # Example 2: simultaneous 90% confidence region for the mean and variance of univariate normal data
# 
# univar <- rnorm(n=50)
# 
# moodvar <- csetMV(dat=univar, method="mood", alpha=0.1, scale="var")
# summary(moodvar)
# plot(moodvar, main="90% Mood Region")
## ---------------------------------------------

Run the code above in your browser using DataLab