Description Usage Arguments Author(s) See Also Examples
View source: R/plot.ivregDecision.R
An object of class 'ivregDecisionList', which is a list of objects of class 'ivregDecision', is output of 'sensIvreg.ivregEX'. This function gives you freedom to stylize a gray-scale plot of a sensitivity analysis.
1 2 3 4 5 6 7 |
x |
An object of class 'ivregDecision' or 'ivregDecisionList'. A decision matrix (or list of matrices) for given treatment effect(s) for different values of the sensitivity parameters. |
xaxes, yaxes, xaxes.label, yaxes.label |
Whether x-axis, y-axis and their labels to be added to the plots. |
legend |
whether a legend will be added to the plot. |
subtitle |
Logical for whether a subtitle to be added in a plot indicating the effect size of a 'ivregDecisionList' object. |
nc |
Optional integer for the number of columns in the plot. |
... |
Optional arguments for R plotting function. |
Bikram Karmakar
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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)', delta1 = seq(-.51, .51, .01),
effect = c(-.1, 0, .1, .15, .17))
plot(z$Z[[1]])
plot(z$Z, nc = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.