Displaying 20 results from an estimated 500 matches similar to: "Durbin-Watson test in packages "car" and "lmtest""
2009 Aug 05
2
Durbin-Watson
Hi,
I ran an experiment with 3 factors, 2 levels and 200 replications and as I want to test for residuals independence, I used Durbin-Watson in R.
I found two functions (durbin.watson and dwtest) and while both are giving the same rho, the p-values are greatly differ:
> durbin.watson(mod1)
lag Autocorrelation D-W Statistic p-value
1 -0.04431012 2.088610 0.012
Alternative
2009 Aug 03
1
Comparison of Output from "dwtest" and "durbin.watson"
Should "dwtest" and "durbin.watson" be giving me the same DW statistic and
p-value for these two fits?
library(lmtest)
library(car)
X <- c(4.8509E-1,8.2667E-2,6.4010E-2,5.1188E-2,3.4492E-2,2.1660E-2,
3.2242E-3,1.8285E-3)
Y <- c(2720,1150,1010,790,482,358,78,35)
W <- 1/Y^2
fit <- lm(Y ~ X - 1)
dwtest(fit,alternative="two.sided")
2011 Aug 12
1
Which Durbin-Watson is correct? (weights involved) - using durbinWatsonTest and dwtest (packages car and lmtest)
Hello!
I have a data frame mysample (sorry for a long way of creating it
below - but I need it in this form, and it works). I regress Y onto X1
through X11 - first without weights, then with weights:
regtest1<-lm(Y~., data=mysample[-13]))
regtest2<-lm(Y~., data=mysample[-13]),weights=mysample$weight)
summary(regtest1)
summary(regtest2)
Then I calculate Durbin-Watson for both regressions
2003 Jun 04
1
Error Using dwtest
Hello all-
I have two time series, Index1stdiff and Comps1stdiff. I regressed the
first on the second and R returned the summary stats I expected. Then I
looked at and plotted the residuals. I then wanted to assess
autocorrelation characteristics and tried to run a Durbin-Watson using:
library(lmtest)
dwtest(formula=Index1stdiff~Comps1stdiff,alternative=c("greater"))
I am
2005 May 19
1
Calculation of Durbin-Watson p-value
Sir,
I am unable to get the source code for Durbin-Watson test, as I want to calculate the p-value for Durbin Watson statistic using interpolation method. I sent this mail to r-help, but it was rejected, please suggest me some way. I will be highly greatful to you.
Thanks in advance
Ramesh
[[alternative HTML version deleted]]
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
2011 Jun 08
1
Autocorrelation in R
Hi,
I am trying to learn time series, and I am attending a colleague's
course on Econometrics. However, he uses e-views, and I use R. I am
trying to reproduce his examples in R, but I am having problems
specifying a AR(1) model. Would anyone help me with my code?
Thanks in advance!
Reproducible code follows:
download.file("https://sites.google.com/a/proxima.adm.br/main/ex_32.csv
2013 Nov 25
2
Durbin Watson Test Bound in R
Hi,
How could I use R to check Durbin Watson Test Bound?
Best,
Rebecca
2001 Nov 21
2
dw statistic
Hello Uwe
First, I want to thank you for spending your time replying to my mail. I'm
very impressed with the speed that my question was answered.
I'm new at R (about two weeks) and reading your mail made me realize that it
was indeed a question of vectors of different lengths. I thinked that I
could create a function ("carfun") without creating a "x" vector, since
2001 Jun 21
2
Durbin Watson stat for ser. corr
Dear R People:
Do any of the linear model or regression function calculate the
Durbin-Watson test statistic for serial correlation, please?
I found the hat matrix, studentized residuals, and so on,
but no D-W.
Thanks so much!
Sincerely,
Erin M. Hodgess, Ph.D.
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
One Main Street
Houston, TX 77002
2011 Nov 20
2
I'm writing this letter to enquire where can I download the package of "lmtest".
Dear editor:
I'm writing this letter to enquire where can I download the package of "lmtest". Can you send me this package?
THanks a lot.
Best regards,
Shu-Fei Wu
2011 Mar 16
1
Autocorrelation in linear models
I have been reading about autocorrelation in linear models over the last
couple of days, and I have to say the more I read, the more confused I
get. Beyond confusion lies enlightenment, so I'm tempted to ask R-Help for
guidance.
Most authors are mainly worried about autocorrelation in the residuals,
but some authors are also worried about autocorrelation within Y and
within X vectors
2007 Mar 07
2
where can I find Durbin-Waston test tables for Confidence Level 2.5% or 0.5%?
Hi all,
I am doing a two-sided DW test:
H0: rho = 0
H1: rho =/= 0
My understanding is that most test statistics tables are one-sided. It's the
way they created the table.
So from online, by doing Googling, I found a bunch of DW tables for
Confidence Level 5%.
Those tables can answer my two-sided question at 5x2 = 10% confidence level.
But what if I want two-sided test at 1% and 5%
2012 Aug 04
4
DAtes
Hi all,
I´m trying to convert as a data frame (with format "date") this copied
excel column of dates (exposed below), I have tried to save them in a txt
file
tfr<-read.table("tfra.txt")
tfr<-data.frame(tfr)
I have tried several things, as date, so on, but always error.
And it makes
Error en as.Date.default(tfr, "%m/%d/%y") :
do not know how to convert
2010 Jul 11
1
Durban Watson statistics
I would like to do the Durban-Watson test on a time series of log returns.
2 questions:
1) If I am just trying to find out if there is serial correlation, what do I do for the residuals? there is no model, so do I just use the log returns (time series) itself?
2) what is the code in R to accomplish this?
Regards
[[alternative HTML version deleted]]
2002 Nov 09
2
importing data from Excel using RODBC
Hi,
I used RODBC to import data from an Excel spreadsheet "*.xls", but some
columns were returned as zeros. When I looked at these columns in Excel, I
found that thery are results of formula calculations and not entry. My
question is: Is there any parameter or command I need to use in order to
overcome this problem?
Thank you
Ahmad Abu Hammour
1999 Nov 07
2
arima0() (PR#314)
Full_Name: Ahmad Abu Hammour
Version: rw0651
OS: windows 95
Submission from: (NULL) (63.23.128.44)
Although I know that "ts package" is preliminary, I wanted to compare the
results from R and SPSS. I ran ARIMA(2,1,2) in both softwares. I got NaN in
standard errors of coefficients from R and real figures from SPSS. I changed
"delta" in R to match that used by SPSS, I received
2011 Dec 30
3
Break Points
Respected Sir
I tried the strucchange
My data is attached. However I tried the attached commands (last
save.txt) to perform Bai Perron 2003... I t worked well but in the end
it is giving warning that overlapping confidence interval... I am not
sure how to proceed... Please Help Me
Thanking You
Ayanendu Sanyal
--
Please have a look at our new mission and contribute into it (cut and
paste the
2002 Sep 09
1
impulse response function
Hi,
Is there a function in any of R-packages that can produce and plot the
impulse response function for any model..
Thank you
Ahmad Abu Hammour
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body",
2002 Aug 14
1
Why can't Anove (car package) see the data?
At the end of the 'Details:' section of the help on Anova (car
package), it states:
The standard R `anova' function calculates sequential (type-I)
tests. These rarely test meaningful hypotheses.
So I thought I'd try it. However, I was perplexed to get this
message:
Browse[1]> Anova.glm(leaf.glm1, type ="II")
Error in terms.formula(formula, data = data) :