piplot.ct | R Documentation |
pistar.ct
piplot.ct
is used to inform the choice of the interval on which to
look for pi* with pistar.ct
. It plots log-likelihood
ratio statistic values of a two-point mixture of a user-supplied model and
an unrestricted component fit to a contingency table on a specified number
of equally-spaced points on a supplied interval.
piplot.ct(fn, data, ..., from = .Machine$double.neg.eps^0.25, to = 1 - .Machine$double.neg.eps^0.25, n = 10, draw = TRUE, color = "black", zero_line = TRUE, add = FALSE, values = FALSE)
fn |
a user-supplied function that inputs a contingency table of observed
values and outputs a contingency table of predicted values. The
function must output a named list with the contingency table of
predicted values named |
data |
a contingency table. |
... |
further arguments passed to the user-supplied function. |
from |
numeric: lower bound of the interval of out-of-model proportions to be explored. |
to |
numeric: upper bound of the interval of out-of-model proportions to be explored. |
n |
numeric: number of equally-spaced points from the interval of out-of-model proportions to be explored. |
draw |
logical: draw a plot or lines? |
color |
color of the line. |
zero_line |
logical: plot a horizontal line at 0? |
add |
logical: add the line to a plot? |
values |
logical: return a dataframe with explored out-of-model proportions and their corresponding log-likelihood ratio statistics? |
Developed from John M. Grego's clr.plot
A plot.
If values = TRUE
returns also an object of class 'PiplotCT' with the
following slots:
pi |
numeric vector of explored out-of-model proportions |
lr |
numeric vector of corresponding log-likelihood ratio statistics |
lr_plus_eps |
|
Juraj Medzihorsky, developed from John M. Grego's clr.plot
Grego, J.M. clr.plot
function available at
http://www.stat.sc.edu/~grego/courses/stat770/CLR.txt
pistar.ct
rcl.em
data(Fienberg1980a) mf <- function(data) loglin(data, list(1, 2), fit=TRUE, print=FALSE) a <- piplot.ct(fn=mf, data=Fienberg1980a, values=TRUE) a plot(a, color="red")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.