autoplot.Hfield3logit: Create a 'gg3logit' plot with field and confidence regions

autoplot.Hfield3logitR Documentation

Create a gg3logit plot with field and confidence regions

Description

autoplot() creates a gg3logit plot and adds a field and its confidence regions. autoplot() is a wrapper for gg3logit() and stat_3logit().

Usage

## S3 method for class 'Hfield3logit'
autoplot(
  object,
  ...,
  mapping_field = aes(),
  mapping_conf = aes(),
  data = NULL,
  params_field = list(),
  params_conf = list(),
  show.legend = NA,
  conf = TRUE
)

Arguments

object

an object of class field3logit or multifield3logit.

...

other arguments passed to specific methods

mapping_field, mapping_conf

aesthetic mappings passed to argument mapping of stat_field3logit() and stat_conf3logit().

data

a field3logit object, a multifield3logit object, or a data.frame structured like a fortified field3logit or a multifield3logit object.

params_field, params_conf

graphical parameters passed to argument mapping of stat_field3logit() and stat_conf3logit().

show.legend

logical. Should this layer be included in the legends? NA, the default, includes if any aesthetics are mapped. FALSE never includes, and TRUE always includes. It can also be a named logical vector to finely select the aesthetics to display.

conf

if TRUE and if confidence regions are available, the layer of stat_conf3logit() is added, otherwise only a gg3logit() object with the layer of stat_field3logit() is returned.

See Also

Other gg functions: gg3logit(), stat_3logit(), stat_conf3logit(), stat_field3logit()

Examples

## Not run: 
data(cross_1year)

mod0 <- nnet::multinom(employment_sit ~ gender + finalgrade, data = cross_1year)
field0 <- field3logit(mod0, 'genderFemale', conf = 0.95)

autoplot(field0)

## End(Not run)


plot3logit documentation built on July 19, 2022, 9:07 a.m.