Displaying 20 results from an estimated 1000 matches similar to: "Heteroskedasticity and autocorrelation of residuals"
2004 Jul 21
2
Testing autocorrelation & heteroskedasticity of residuals in ts
Hi,
I'm dealing with time series. I usually use stl() to
estimate trend, stagionality and residuals. I test for
normality of residuals using shapiro.test(), but I
can't test for autocorrelation and heteroskedasticity.
Is there a way to perform Durbin-Watson test and
Breusch-Pagan test (or other simalar tests) for time
series?
I find dwtest() and bptest() in the package lmtest,
but it
2009 Sep 18
1
some irritation with heteroskedasticity testing
Dear all,
Trying to test for heteroskedasticity I tried several test from the
car package respectively lmtest. Now that they produce rather
different results i am somewhat clueless how to deal with it.
Here is what I did:
1. I plotted fitted.values vs residuals and somewhat intuitively
believe, it isn't really increasing...
2. further I ran the following tests
bptest (studentized
2009 Jun 26
1
Heteroskedasticity and Autocorrelation in SemiPar package
Hi all,
Does anyone know how to report heteroskedasticity and autocorrelation-consistent standard errors when using the "spm" command in SemiPar package? Suppose the original command is
sp1<-spm(y~x1+x2+f(x3), random=~1,group=id)
Any suggestion would be greatly appreciated.
Thanks,
Susan
[[alternative HTML version deleted]]
2012 Sep 18
1
Contradictory results between different heteroskedasticity tests
Hi all,
I'm getting contradictory results from bptest and ncvTest on a model
calculated by GLS as:
olslm = lm(log(rr)~log(aloi)*reg*inv, data)
varlm = lm(I(residuals(olslm)^2)~log(aloi)*reg*inv, data)
glslm = lm(log(rr)~log(aloi)*reg*inv, data, weights=1/fitted(varlm))
Testing both olslm and glslm with both ncvTest and bptest gives:
> ncvTest(olslm)
Non-constant Variance Score Test
2007 Feb 21
0
Problems with obtaining t-tests of regression
Guillermo,
I am dropping most of your mail because my answer is very generic.
First, why doesn't it work as you tried it: technically speaking,
coeftest() and the like expect to be feed an lm or a glm object and for
this reason won't accept the result of systemfit(), which is a much
different object. I suppose the same goes for the rest.
Second, what can you do: I'd do at least one
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
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
2011 Jan 20
2
Regression Testing
I'm new to R and some what new to the world of stats. I got frustrated
with excel and found R. Enough of that already.
I'm trying to test and correct for Heteroskedasticity
I have data in a csv file that I load and store in a dataframe.
> ds <- read.csv("book2.csv")
> df <- data.frame(ds)
I then preform a OLS regression:
> lmfit <- lm(df$y~df$x)
To
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 Nov 23
0
Error using coeftest() with a heteroskedasticity-consistent estimation of the covar.
Hey
I am trying to run /coeftest()/ using a heteroskedasticity-consistent
estimation of the covariance matrix and i get this error:
# packages
>library(lmtest)
>library(sandwich)
#test
> coeftest(*GSm_inc.pool*, vcov = vcovHC(*GSm_inc.pool*, method="arellano",
> type="HC3"))
/Fehler in 1 - diaghat : nicht-numerisches Argument f?r bin?ren Operator/
something like:
2011 Jul 25
1
predict() and heteroskedasticity-robust standard errors
Hello there,
I have a linear regression model for which I estimated
heteroskedasticity-robust (Huber-White) standard errors using the
coeftest function
in the lmtest-package.
Now I would like to inspect the predicted values of the dependent
variable for particular groups and include a confidence interval for
this prediction.
My question: is it possible to estimate confidence intervals for the
2012 May 25
1
Problem with Autocorrelation and GLS Regression
Hi,
I have a problem with a regression I try to run. I did an estimation of the
market model with daily data. You can see to output below:
/> summary(regression_resn)
Time series regression with "ts" data:
Start = -150, End = -26
Call:
dynlm(formula = ror_resn ~ ror_spi_resn)
Residuals:
Min 1Q Median 3Q Max
-0.0255690 -0.0030378 0.0002787
2004 Aug 12
0
"new" package sandwich 0.1-3
Dear useRs,
here is the announcement for the next "new" package:
sandwich 0.1-3.
sandwich provides heteroskedasticity (and autocorrelation)
consistent covariance matrix estimators (also called HC
and HAC estimators).
The former are implemented in the function vcovHC() (which
was available in strucchange before - and independently
in hccm() in John Fox's car package).
And the
2004 Aug 12
0
"new" package sandwich 0.1-3
Dear useRs,
here is the announcement for the next "new" package:
sandwich 0.1-3.
sandwich provides heteroskedasticity (and autocorrelation)
consistent covariance matrix estimators (also called HC
and HAC estimators).
The former are implemented in the function vcovHC() (which
was available in strucchange before - and independently
in hccm() in John Fox's car package).
And the
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
2008 Apr 26
0
Help with simulation of heteroskedasticity
Hello guys!
Sorry to bother with such a question
I was trying to generate a monte carlo simulation with heteroskedasticity
errors. but I am not sure if the command line that I had
wrote is quite correct.
the type of heteroskedasticity that I want to create is such as var(e) =
var(x^4)
I began my work with this
x<- rnorm (100, 2,0.4) # generating an indepedent random variable
e<-
2012 Apr 15
0
correct standard errors (heteroskedasticity) using survey design
Hello all,
I'm hoping someone can help clarify how the survey design method works in
R. I currently have a data set that utilized a complex survey design. The
only thing is that only the weight is provided. Thus, I constructed my
survey design as:
svdes<-svydesign(id=~1, weights=~weightvar, data=dataset)
Then, I want to run an OLS model, so:
fitsurv<-svyglm(y~x1+x2+x3...xk,
2004 Jan 14
3
How can I test if time series residuals' are uncorrelated ?
Ok I made Jarque-Bera test to the residuals (merv.reg$residual)
library(tseries)
jarque.bera.test(merv.reg$residual)
X-squared = 1772.369, df = 2, p-value = < 2.2e-16
And I reject the null hypotesis (H0: merv.reg$residual are normally
distributed)
So I know that:
1 - merv.reg$residual aren't independently distributed (Box-Ljung test)
2 - merv.reg$residual aren't indentically
2010 Mar 22
0
using lmer weights argument to represent heteroskedasticity
Hi-
I want to fit a model with crossed random effects and heteroskedastic
level-1 errors where inferences about fixed effects are of primary
interest. The dimension of the random effects is making the model
computationally prohibitive using lme() where I could model the
heteroskedasticity with the "weights" argument. I am aware that the weights
argument to lmer() cannot be used to
2005 Jun 04
1
the test result is quite different,why?
data:http://fmwww.bc.edu/ec-p/data/wooldridge/CRIME4.dta
> a$call
lm(formula = clcrmrte ~ factor(year) + clprbarr + clprbcon +
clprbpri + clavgsen + clpolpc, data = cri)
> bptest(a,st=F)
Breusch-Pagan test
data: a
BP = 34.4936, df = 10, p-value = 0.0001523
> bptest(a,st=T)
studentized Breusch-Pagan test
data: a
BP = 10.9297, df = 10, p-value = 0.363
>