ivreg.fit.EX: Fits the Two Stage Least Squared Estimates and EX estimates

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

Description

Calculates the instrumental variables model when the output, regressors and instrument matrices are explicitly provided.

Usage

1

Arguments

x

regressor matrix.

y

vector with dependent variable.

z

instruments matrix.

weights

an optional vector of weights to be used in the fitting process.

offset

an optional offset that can be used to specify an a priori known component to be included during fitting.

...

further arguments passed to lm.fit or link[stats]{lm.wfit}, respectively.

Details

See documentation of ivreg.fit for further operational details.

Statistical inference and sensitivity analysis based on the output of ivreg.fit.Ex can be performed using coeftestIV and sensIvreg functions.

Value

ivreg.fit.EX returns an object of class ivregEX list with the following components:

coefficients

parameter estimates.

residuals

a vector of residuals.

fitted.values

a vector of predicted means.

weights

either the vector of weights used (if any) or NULL (if none).

offset

either the offset used (if any) or NULL (if none).

estfun

a matrix containing the empirical estimating functions.

n

number of observations.

nobs

number of observations with non-zero weights.

rank

the numeric rank of the fitted linear model.

df.residual

residual degrees of freedom for fitted model.

cov.unscaled

unscaled covariance matrix for the coefficients.

sigma

residual standard error.

y

the response vector.

x

a list with elements "regressors", "instruments", "projected", containing the model matrices from the respective components. "projected" is the matrix of regressors projected on the image of the instruments.

coefficientsEX

parameter estimates of the EX analysis

residualsEX

vector of residuals in EX regression

fitted.valuesEX

vector of fitted values in EX regression

vhat

residuals of first stage of two stage least squared analysis

vars

A list of variable names. List has three vectors for three kinds of variables: 'exogenous', 'endogenous' and 'instruments'.

Author(s)

Bikram Karmakar

See Also

ivreg.EX, coeftestIV, sensIvreg, ivreg.fit

Examples

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


x = CigarettesSW[CigarettesSW[,'year'] == "1995", c('rprice', 'rincome')]
y = CigarettesSW[CigarettesSW[,'year'] == "1995", c('packs')]
z = CigarettesSW[CigarettesSW[,'year'] == "1995", c('tdiff', 'rincome')]

fm3 <- ivreg.fit.EX(as.matrix(x), y, z)

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