print.diffci: Print Confidence Intervals for Predicted Probabilities and...

Description Usage Arguments Value Author(s) Examples

Description

Print method for output from the probci function.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## S3 method for class 'diffci'
print(
  x,
  type = c("pr", "pw"),
  ...,
  digits = 4,
  filter = NULL,
  const = NULL,
  onlySig = FALSE
)

Arguments

x

A object of class diffci produced by probci.

type

Which kind of result to print - predictions (pr) or pairwise differences in predictions (pw).

...

Other arguments to be passed down to print, currently unimplemented.

digits

How many digits to round output.

filter

A named list of values where the names indicate the variable to be filtered and the values in the vector indicate the values to include for the filtering variable.

const

A string identifying the name of the variable to be held constant across comparisons. Only applies if type = "pw".

onlySig

Logical indicating whether all differes should be displayed or only those significant at the 95% two-tailed level.

Value

An data frame with the following variables:

variables

The variables and the values at which they are held constant. For example, tmp1 would be the first value of tmp used in the probability calculation and tmp2 would be the second value of tmp used in the probability calculation.

pred_prob

The difference in predicted probability given the following change in X: tmp2-tmp1.

lower, upper

The lower and upper 95% confidence bounds.

Author(s)

Dave Armstrong

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(france)
left.mod <- glm(voteleft ~ male + age + retnat + 
	poly(lrself, 2, raw=TRUE), data=france, family=binomial)
data(france)
left.mod <- glm(voteleft ~ male + age + retnat + 
                  poly(lrself, 2, raw=TRUE), data=france, family=binomial)
out <- probci(left.mod, france, numQuantVals=3, 
              changeX=c("retnat", "lrself"), calcPW = TRUE)
print(out, filter=list(retnat=c("Better", "Worse")))
print(out, type="pw", 
      filter=list(retnat=c("Better", "Worse")),
      const="lrself")

DAMisc documentation built on Jan. 12, 2022, 1:07 a.m.