senslm: Sensitivity analysis of a least squared regression estimator

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/senslm.R

Description

Performs a sensitivity analysis of the least squared regression

Usage

1
senslm(lmfit, coefmat, variable, delta1 = seq(-0.1, 0.1, 0.01), alpha = 0.05, ...)

Arguments

lmfit

An obeject of class "lm".

coefmat

Optional matrix of class "coeftest" an output of coeftest.

variable

Treatment variable of interest.

delta1

A numeric vector of values of the first sensitivity parameter. Default value seq(-.1, .1, .01).

alpha

Significance level. Default at 0.05.

...

May be ignored, used in sensOLS.

Details

delta1 is the partial correlation of the unobservable and the treatment. It measures the amount of violation in the assumption of no-unmeasured confounding.

Value

Returns an object of class "si".

An object if class "si" is essentially a matrix of two columns for the the upper and lower sensitivity limits corresponding to the sensitivity parameters.

Author(s)

Bikram Karmakar

See Also

sensIvreg, plot.sensIvregEX, plot.si

Examples

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

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

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

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