Learn R Programming

plot3logit (version 2.2.0)

get_vdelta: It computes the vector of covariate change

Description

Given the argument delta passed to field3logit either as a numeric vector, a character or an expression (see field3logit), get_vdelta returns the numeric vector of covariate change \(\Delta\in\textbf{R}^k\).

Usage

get_vdelta(delta, model)

Arguments

delta
model

object returned by read_model.

Value

numeric vector of covariate change \(\Delta\in\textbf{R}^k\).

Examples

Run this code
# NOT RUN {
library(magrittr)

# Example 1
matrix(c(0.11, 0.07, -0.1, 0.09), 2) %>%
  plot3logit:::read_model('logit') %>%
  plot3logit:::get_vdelta(c(0, 1), .)

# Example 2
library(nnet)
data(cross_1year)
mod0 <- multinom(employment_sit ~ ., cross_1year)
plot3logit:::read_model(mod0, 'logit') %>%
  plot3logit:::get_vdelta('genderFemale', .)

# Example 3
plot3logit:::read_model(mod0, 'logit') %>%
  plot3logit:::get_vdelta('-0.5 * genderFemale + hsscore', .)

# }

Run the code above in your browser using DataLab