Learn R Programming

ivregEX (version 1.0)

plot.si: Plot Insensitive Region

Description

This function provides a visual representation of the sensitivity intervals.

Usage

# S3 method for si
plot(x, effect = 0, ...)

Arguments

x

An object of class 'si'; output of senslm and sensIvreg.ivreg.

effect

Optional value of the null treatment effect.

Optional arguments for the R plotting function.

Examples

Run this code
# NOT RUN {
data("CigarettesSW", package = "AER")
CigarettesSW$rprice <- with(CigarettesSW, price/cpi)
CigarettesSW$rincome <- with(CigarettesSW, income/population/cpi)
CigarettesSW$tdiff <- with(CigarettesSW, (taxs - tax)/cpi)

library(AER)


lmfit <- lm(log(packs) ~ log(rprice) + log(rincome), data = CigarettesSW, subset = year == "1995")

z <- senslm(lmfit, variable = 'log(rprice)')
plot(z)

# }

Run the code above in your browser using DataLab