Displaying 20 results from an estimated 200 matches similar to: "Confidence intervals for the Instrumental Variable estimators of TWO causal effects"
2009 Dec 15
2
Instrumental Variables Regression
Hi there,
I hope to build a model Y ~ X1 + X2 + X3 + X4 with X1 has two
instrumental variable A and B, and X2 has one instrumental variable A. I
have searched the R site and mailling list, and known that the tsls()
from sem package and ivreg() from AER package can deal with instrumental
variable regression, however, I don't know how to formula the model.
Any suggestion will be really
2012 Nov 29
1
instrumental variables regression using ivreg (AER) or tsls (sem)
Dear friends,
I am trying to understand and implement instrumental variables
regression using R.
I found a small (simple) example here which purportedly illustrates the
mechanics (using 2-stage least-squares):
http://www.r-bloggers.com/a-simple-instrumental-variables-problem/
Basically, here are the R commands (reproducible example) from that
site:
# ------ begin R
library(AER)
2013 Mar 19
0
Epple and McCallum TSLS example
Hello,
I am trying to replicate the "missing example" of a TSLS estimation in
Epple & McCallum (link below)
http://wpweb2.tepper.cmu.edu/facultyadmin/upload/ppaper_32774807225408_Epple-McCallum93.pdf
According to them, the commands are in:
http://www.tepper.cmu.edu/faculty-research/faculty-pages/dennis-epple/simultaneous-equation-econometrics/index.aspx
They use the Stata's
2010 May 02
1
question about 2SLS
Hi All,
I am using R 2.11.0 on a Ubuntu machine. I estimated a model using "tsls"
from the package "sem". Is there a way to get Newey West standard errors for
the parameter estimates?
When estimating the model by OLS, I used "NeweyWest" from the package
"sandwich" to get HAC standard errors. But, I am not able to use the same
method with the results of the
2013 Jun 23
1
2SLS / TSLS / SEM non-linear
Dear all, I try to conduct a SEM / two stage least squares regression with
the following equations:
First: X ~ IV1 + IV2 * Y
Second: Y ~ a + b X
therein, IV1 and IV2 are the two instruments I would like to use. the
structure I would like to maintain as the model is derived from economic
theory. My problem here is that I have trouble solving the equations to get
the reduced form so I can run
2001 Aug 22
1
limited formula length in tsls
Dear all,
Using the tsls package, I noticed that regression lists longer
than 64 character
are getting truncated. Looking at the original source,
tsls.formula <- function(model, instruments, data, subset, weights,
na.action, contrasts=NULL){
if (missing(na.action))
na.action <- options()$na.action
m <- match.call(expand.dots = FALSE)
if (is.matrix(eval(m$data,
2024 Jan 28
0
2SLS with Fixed Effects and Control Variables
Kelis,
thanks for your interest. It's hard to say what exactly goes wrong based
on the information you provide. However, I would recommend that you first
process the data:
- Store all variables as the appropriate types (numeric, factor, etc.)
in the data frame. Then you don't have to put these things into the model
formula.
- Employ variable names without spaces, then you don't
2024 Jan 28
1
2SLS with Fixed Effects and Control Variables
Dear John Fox, Christian Kleiber, and Achim Zeileis,
I am attempting to run various independent variable parameters to assess
their suitability. Unfortunately, I hit a snag and couldn't get the tests
to run properly. When I used ivreg, I got an error message saying: "Error
in eval(predvars, data, env) : object 'WageInequality' not found."
Can you please help?
Model:
2001 Aug 13
3
Problems with downloading R 1.3.0
I am trying to download R.1.3 for Windows , and I have troubles with some
of the .zip files. I am working with a laptop
operating on Windows 98 and use Netscape 4.5 as a browser.
I have downloaded without problems the following files:
rw1030b1.zip
rw1030ch.zip
rw1030d1.zip
rw1030d2.zip
rw1030sp.zip
rw1030w.zip
but when I try to download
rw1030b2.zip
rw1030h.zip
rw1030l.zip
the
2009 May 12
0
R^2 extraction and autocorrelation/heterokedasticity on TSLS regression
Hi,
I'm actually I’m performing a TSLS linear multiple regression on annually data which go from 1971 to 1997. After performing the TSLS regression, I tried to extract the R squared value using “output$r.squared” function and to perform autocorrelation (Durbin Watson and Breush Godfrey) and heterokedasticity tests (Breush-pagan and Goldfeld Quandt) but I have errors messages. More
2007 Feb 19
1
Urgent: How to obtain the Consistent Standard Errors after apply 2SLS through tsls() from sem or systemfit("2SLS") without this error message !!!!!!!!!!!!!
Hi,
I am trying to obtain the heteroskedasticity consitent standard errors
(HCSE) after apply 2SLS. I obtain 2SLS through tsls from package sem or
systemfit:
#### tsls ####
library (sem)
Reg2SLS <-tsls(LnP~Sc+Ag+Ag2+Var+R+D,~I2+Ag+Ag2+Var+R+D)
summary (Reg2SLS)
#### systemfit ####
library (systemfit)
RS <- LnP~Sc+Ag+Ag2+Var+R+D
Inst <- ~I2+Ag+Ag2+Var+R+D
labels
2007 Feb 20
0
Problems with obtaining t-tests of regression coefficients applying consistent standard errors after run 2SLS estimation. Clearer !!!!!
First I have to say I am sorry because I have not been so clear in my
previous e-mails. I will try to explain clearer what it is my problem.
I have the following model:
lnP=Sc+Ag+Ag2+Var+R+D
In this model the variable Sc is endogenous and the rest are all objective
exogenous variables. I verified that Sc is endogenous through a standard
Hausman test. To determine this I defined before a new
2013 Oct 19
2
ivreg with fixed effect in R?
I want to estimate the following fixed effect model:
y_i,t = alpha_i + beta_1 x1_t + beta_2 x2_i,tx2_i,t = gamma_i + gamma_1
x1_t + gamma_2 Z1_i + gamma_3 Z2_i
I can use ivreg from AER to do the iv regression.
fm <- ivreg(y_i,t ~ x1_t + x2_i,t | x1_t + Z1_i + Z2_i,
data = DataSet)
But, I'm not sure how can I add the fixed effects.
Thanks!
[[alternative HTML
2007 Apr 09
1
Dealing with large nominal predictor in sem package
Hi,
I am using tsls function from sem package to estimate a model which includes large number of data. Among its predictors, it has a nominal data which has about 10 possible values. So I expand this parameter into 9-binary-value predictors with the coefficient of base value equals 0. I also have another continuous predictor.
The problem is that, whenever I run the tsls, I will get 'System
2011 Aug 01
1
ivreg and structural change
Hello,
I am looking for some help with this question: how could I test structural
breaks in a instrumental variables´s model?
For example, I was trying to do something with my model with three time
series.
tax_ivreg <- ivreg(l_y ~ l_x2 + l_x1+ dl_y | lag(l_x2, -1)+lag(l_x2, -2)+
lag(l_x1, -1)+lag(l_x1, -2)+lag(l_y, -1)+lag(l_y, -2), data=tax1)
summary(tax_ivreg)
## after estimating it,
2012 Jul 25
1
packages for LIML and JIVE estimators
Hi! I am a new user for R. Recently I plan to write a program to estimate linear model with instrumental variables. I try to use Limit information maximum likelihood method and Jackknife instrumental variable method, but I do not know which R packages I need to use. Whether anybody may inform me the packages I need to download?
Thanks a lot.
Eric Wang
[[alternative HTML version deleted]]
2011 Jun 27
1
Hardy Weinberg Simulation
Hello,
I am trying to simulate 10 relicates of 100-tables. Each table is a 2 x 3
and 80% pf the tables are true nulls and 20% are non-nulls. The nulls follow
the Hardy Weinberg distribution (ratio) 1:2:1.
I have the code below but the p-values are not what I am expecting. I want
to use the Cochran Armitage trend test to get the p-values.
num.reps=10
num.vars=1000
pi0 = 80
num.subjects = 100
2001 Nov 27
2
overlaying qqnorm plots...
I know this topic has had plenty of discussion in the last couple of days,
but....
I've been trying to compare the effects of different fitted methods for
systems of equations (OLS, SUR, 2SLS, 3SLS ) and would like to compare the
residual plots (easy) and the qqnorm/qqplot of the fits for the different
fitted methdos. For example,
qqnorm( residuals( lm( q ~ p + f + a ) ) )
par( new = TRUE )
2012 Mar 21
1
How to do 2SLS in R
Hi List
I want to carry out structural mode. Following Example l have taken from
Basic Econometrics- Damodar Gujarati :
Advertising intensity function:
Ad/S = a0 + a1M + a2 (CD/S) + a3C + a4C2 + a5Gr + a6Dur – (1)
Concentration function:
C = b0 + b1 (Ad/S) + b2 (MES/S) -(2)
Price-cost margin function:
M = c0 + c1(K/S) + c2Gr + c3C + c4GD + c5(Ad/S) + c6 (MES/S)
2009 May 29
1
Error messages/systemfit package
Hello !
I’m trying to estimate a system of equation (demand and supply) using the systemfit package. My program is:
library(systemfit)
demand <- tsyud ~ tsyud1 + tsucp + tspo + tssn
supply <- tscn ~ tsyn + tsqn + tsksn + tsucp
system <- list(demand=eqdemand, learning = eqsupply)
labels <- list(demand="eqdemand", learning="eqsupply")
inst <- ~ tsupp1 + tsupp2