plot.sensIvregEX: Plotting of Sensitivity Analyses

Description Usage Arguments Note Author(s) See Also Examples

View source: R/plot.sensIvregEX.R

Description

Based on the output of sensIvreg creates plots of sensitive regions.

Usage

1
2
## S3 method for class 'sensIvregEX'
plot(x, effect = 0, ...)

Arguments

x

An object of class 'sensIvregEX', output of sensIvreg.

effect

Effect size (optional). Default value is 0.

...

Optional arguments for R plotting features.

Note

This functionally creates two sets of plots, one a greyscale plot of the sensitivity analyses in the secondary instrumental variables analysis with independent EX analysis. Additionally it creates a plot of individual sensitivity regions for each analyses for the given effect size.

Author(s)

Bikram Karmakar

See Also

plot.ivregDecision,

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
data("CigarettesSW", package = "AER")
CigarettesSW$rprice <- with(CigarettesSW, price/cpi)
CigarettesSW$rincome <- with(CigarettesSW, income/population/cpi)
CigarettesSW$tdiff <- with(CigarettesSW, (taxs - tax)/cpi)


fm2 <- ivreg.EX(log(packs) ~ log(rprice) + log(rincome) | tdiff + log(rincome), 
			data = CigarettesSW, subset = year == "1995")
lmfit <- lm(log(packs) ~ log(rprice) + log(rincome), data = CigarettesSW, subset = year == "1995")
res = coeftestIV(fm2, lmfit, 'log(rprice)')

z <- sensIvreg(fm2, res, 'log(rprice)', effect = c(-.1, 0, .1, .15, .17), show = FALSE)

plot(z, nc = 3)

ivregEX documentation built on May 1, 2019, 10:08 p.m.