Displaying 20 results from an estimated 4000 matches similar to: "robust standard errors for panel data"
2010 Oct 14
1
robust standard errors for panel data - corrigendum
Hello again Max. A correction to my response from yesterday. Things were better than they seemed.
I thought it over, checked Arellano's panel book and Driscoll and Kraay (Rev. Econ. Stud. 1998) and finally realized that vcovSCC does what you want: in fact, despite being born primarily for dealing with cross-sectional correlation, 'SCC' standard errors are robust to "both
2011 Sep 28
1
Robust covariance matrix with NeweyWest()
Dear R-users,
I would like to compute a robust covariance matrix of two series of realizations of random variables:
###Begin Example###
data <- cbind(rnorm(100), rnorm(100))
model <- lm(data ~ 1)
vcov(model)
library(sandwich)
NeweyWest(model) #produces an error
###End Example###
NeweyWest() produces an error but sandwich(), vcovHAC(), kernHAC, weave(),... do not produce any errors. It
2013 Mar 30
1
vcovHC and arima() output
Dear all,
how can I use vcovHC() to get robust/corrected standard errors from an
arima() output?
I ran an arima model with AR(1) and got the estimate, se, zvalue and
p-value using coeftest(arima.output).
However, I cannot use vcovHC(arima.output) to get corrected standard
errors. It seems vcovHC works only with lm and plm objects?
Is there another way I can get robust/corrected
2009 Dec 08
1
Serial Correlation in panel data regression
Dear R users,
I have a question here
library(AER)
library(plm)
library(sandwich)
## take the following data
data("Gasoline", package="plm")
Gasoline$f.year=as.factor(Gasoline$year)
Now I run the following regression
rhs <- "-1 + f.year + lincomep+lrpmg+lcarpcap"
m1<- lm(as.formula(paste("lgaspcar ~", rhs)), data=Gasoline)
###Now I want to find the
2012 Mar 12
2
Replicating Stata's xtreg clustered SEs in R
I'm trying to replicate a time-series cross-sectional analysis
(countries over years) with SEs clustered by country. ?The original
analysis was done in Stata 10 with: xtreg [DV] [IVs] fe
cluster(country).
Using plm() in R (cran.r-project.org/web/packages/plm/index.html),
I've replicated the coefficients. I sought to estimate
country-clustered SEs with vcovHC(), and tried a variety of
2008 May 08
2
poisson regression with robust error variance ('eyestudy
Ted Harding said:
> I can get the estimated RRs from
> RRs <- exp(summary(GLM)$coef[,1])
> but do not see how to implement confidence intervals based
> on "robust error variances" using the output in GLM.
Thanks for the link to the data. Here's my best guess. If you use
the following approach, with the HC0 type of robust standard errors in
the
2010 May 10
2
Robust SE & Heteroskedasticity-consistent estimation
Hi,
I'm using maxlik with functions specified (L, his gradient & hessian).
Now I would like determine some robust standard errors of my estimators.
So I 'm try to use vcovHC, or hccm or robcov for example
but in use one of them with my result of maxlik, I've a the following
error message :
Erreur dans terms.default(object) : no terms component
Is there some attributes
2011 Jul 25
1
biglm() and NeweyWest()
Dear all,
I am working on a large dataset and need to use biglm() to perform OLS
regressions. I have detected significant ARCH effects which I try to account
for using the Newey-West correction.
So far, I have worked with NeweyWest() in the sandwich package. NeweyWest()
however seems to be unable to handle an object of class "biglm".
Looking into the code, I figured out that
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
2011 Jul 11
1
Robust vce for heckman estimators
When using function heckit() from package ‘sampleSelection’, is there anyway to make t-tests for the coefficients using robust covariance matrix estimator? By “robust” I mean something like if a had an object ‘lm’ called “reg” and then used:
> coeftest(reg, vcov = vcovHC(reg)).
I’m asking this because in Stata we could use function heckman and then use vce option “robust”. We could do the
2016 Mar 31
2
Ask if an object will respond to a function or method
In the rockchalk package, I want to provide functions for regression
objects that are "well behaved." If an object responds to the methods
that lm or glm objects can handle, like coef(), nobs(), and summary(),
I want to be able to handle the same thing.
It is more difficult than expected to ask a given fitted model object
"do you respond to these functions: coef(), nobs(),
2011 Sep 09
1
Exception in NeweyWest - Pre-Whitening necessary?
Hi guyz,
I have run my algorithm in R (see http://pastebin.com/q84Tujfg) and got the following error:
Error in ar.ols(x, aic = aic, order.max = order.max, na.action = na.action, :
'order.max' must be < 'n.used'
I am pretty sure, that the error comes from the NeweyWest function in line 45, as the NeweyWest function uses the ar.ols() function for pre whitening. Does anyone
2010 May 24
1
Fixed Effects Estimations (in Panel Data)
dear readers---I struggled with how to do nice fixed-effects
regressions in large economic samples for a while. Eventually, I
realized that nlme is not really what I needed (too complex), and all
I really wanted is the plm package. so, I thought I would share a
quick example.
################ sample code to show fixed-effects models? in R
# create a sample panel data set with firms and years
2011 Sep 19
1
"could not find function" after import
I am trying to build a package (GWASTools, submitted to Bioconductor)
that uses the "sandwich" package. I have references to "sandwich" in
DESCRIPTION:
Imports: methods, DBI, RSQLite, sandwich, survival, DNAcopy
and NAMESPACE:
import(sandwich)
In the code itself is a call to vcovHC:
Vhat <- vcovHC(mod, type="HC0")
I have sandwich version 2.2-7 installed.
2010 Sep 23
1
Newey West and Singular Matrix + library(sandwich)
thank you, achim. I will try chol2inv.
sandwich is a very nice package, but let me make some short
suggestions. I am not a good econometrician, so I do not know what
prewhitening is, and the vignette did not explain it. "?coeftest" did
not work after I loaded the library. automatic bandwidth selection
can be a good thing, but is not always.
as to my own little function, I like the
2005 Jul 22
1
time series and regions of change
Preface: this is a statistical question more than an R question.
I have a vector of numbers (assume a regular time series). Within this
time series, I have a set of regions of interest (all of different
lengths) that I want to compare against a "baseline" (which is known).
There is some autocorrelation involved. I would like to determine the
"significance" of the
2006 Dec 24
1
extend summary.lm for hccm?
dear R experts:
I wonder whether it is possible to extend the summary method for the
lm function, so that it uses an option "hccm" (well, model "hc0"). In
my line of work, it is pretty much required in reporting of almost all
linear regressions these days, which means that it would be very nice
not to have to manually library car, then sqrt the diagonal, and
recompute
2008 Dec 19
1
svyglm and sandwich estimator of variance
Hi,
I would like to estimate coefficients using poisson regression and then get
standard errors that are adjusted for heteroskedasticity, using a complex
sample survey data. Then I will calculate prevalence ratio and confidence
intervals.
Can sandwich estimator of variance be used when observations aren?t
independent? In my case, observations are independent across groups
(clusters), but
2010 Jun 27
1
NeweyWest
I want to calculate Newey West robust standard error using NeweyWest. Comparing the results to what I get in STATA, in order to get the same results in I need to specify "prewhite=0". Can someone explain what this prewhite command means?
Thanks
[[alternative HTML version deleted]]
2011 Jan 01
2
robust standard error of an estimator
Hi,
I have ove the robust standard error of an estimator but I don't know how to
do this.
The code for my regression is the following:
reg<-lm(fsn~lctot)
But then what do I need to do?
--
Charlène Lisa Cosandier
[[alternative HTML version deleted]]