Displaying 20 results from an estimated 300 matches similar to: "Newey West and Singular Matrix"
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
2009 Dec 10
2
Problem with coeftest using Newey West estimator
Hi,
I want to calculate the t- and p-values for a linear model using the Newey West estimator.
I tried this Code and it usually worked just fine:
> oberlm <- lm(DYH ~ BIP + Infl + EOil, data=HU_H)
> coeftest(oberlm, NeweyWest(oberlm, lag=2))
t test of coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 0.1509950 0.0743832 2.0300 0.179486
BIP
2008 Nov 20
0
A Problem while Calculating Newey-West HAC
Hi,
Does anyone read Verbeek's "A Guide to Modern Econometrics"? In its Section
4.11, how does the last two equations' HAC calculate? I've tried several
groups of parameters in sandwich::NeweyWest, but I still cannot get the same
result. I've tried lag=2 and lag=3, as long as prewhite=FALSE and
prewhite=TRUE yet, but...
Sincerely
Hsiao-nan Cheung
2002 Oct 15
2
glm and Newey-West estimator
Dear R-users,
has anybody combined the glm function with the Newey-West estimator of
variance, similar as in Stata 7.0? I'd like to estimate corrected
standard errors within a logistic regression model, taking into account
the auto-correlated binary observations within individuals.
I use R1.5.1 on Mac OS X (10.2).
Thanks,
Christof
2013 Mar 26
1
Newey West HAC for pooled cross-section data
Hello:
My dataset set contains several thousand rows of data, with each row
containing information for a house. The variables include the sale price of
the house, the quarter and year of sale, the attributes of the house, and
the attributes of the neighborhood and the city in which the house is
located. The data is for a 10-year period. No house is repeated in the
dataset. In summary, the dataset
2007 Oct 26
1
Newey-West and SUR regression models
Is anyone aware of a procedure to apply Newey-West corrections for
autocorrelation to a SUR regression model? The SANDWICH package seems to be
applicable only to LM or GLM models.
Thanks,
Richard Saba
Department of Economics
Auburn University
Email: sabaric at auburn.edu
2011 Jan 22
1
Newey West HAC-errors for panels
Dear all,
I am looking for an equivalent to the "newey2"-extension in Stata, in
order to compute Newey-West HAC standard errors in a regression using
panel data.
I would be very grateful for advice which R-package could do this.
I thank you very much in advance.
Dirius
2000 Feb 14
2
Error in the inverse of a diagonal matrix?
I?m new to R so maybe this issue has been asked before and I still could not read the complete set of past messages sent to the list.
I found a weird behabiour that I will explain with a simple example. Lets consider the following block of commands:
> x <- diag(c(1,4,10))
> x
[,1] [,2] [,3]
[1,] 1 0 0
[2,] 0 4 0
[3,] 0 0 10
> invx <- x^-1
> invx
2012 Dec 11
2
Catching errors from solve() with near-singular matrices
Dear all,
The background is that I'm trying to fix this bug in the geometry
package:
https://r-forge.r-project.org/tracker/index.php?func=detail&aid=1993&group_id=1149&atid=4552
Boiled down, the problem is that there exists at least one matrix X for
which det(X) != 0 and for which solve(X) fails giving the error "system
is computationally singular: reciprocal condition
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
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
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]]
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
2011 Oct 21
1
R square and F - stats in PLS
In the lm function the summary(lmobject) we have adjusted.r square and f
statistics
Do we have similar to the pls package and how to get it
--
View this message in context: http://r.789695.n4.nabble.com/R-square-and-F-stats-in-PLS-tp3924484p3924484.html
Sent from the R help mailing list archive at Nabble.com.
2011 Nov 30
1
Storing the linear model object
Hi
Please let me know if we can store the linear model object in the data
base and retrive the object and output from them
Data<- read.csv("C:/FE and RE.csv")
Formula="Y~X2+X3+X4
lmobject = lm(formula=Formula,data=Data)
can i store the lm object in the database and and is it possible to retrive
it and get the summary information
--
View this message in context:
2006 Dec 17
2
X11 fonts and Ubuntu
Hi,
I am moving from Windows XP to Ubuntu 6.10 and installed R 2.4.0. When I
run eg plot.lm (things work fine with plot.default - eg
plot(rnorm(30),rnorm(30)))
plot(lmobject)
I can get the first plot and then this message:
Hit <Return> to see next plot:
Error in text.default(x, y, labels.id[ind],cex=cex, xpd=TRUE, :
could not find any X11 fonts
Check that the Font Path is correct
2008 May 22
1
How to account for autoregressive terms?
Hi,
how to estimate a the following model in R:
y(t)=beta0+beta1*x1(t)+beta2*x2(t)+...+beta5*x5(t)+beta6*y(t-1)+beta7*y(t-2)+beta8*y(t-3)
1) using "lm" :
dates <- as.Date(data.df[,1])
selection<-which(dates>=as.Date("1986-1-1") & dates<=as.Date("2007-12-31"))
dep <- ts(data.df[selection,c("dep")])
indep.ret1
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
2009 Apr 29
1
Dynamic visualisation of R data using Adobe FLEX
Hi useRs,
I had posted about Adobe FLEX talking to R for rich visualisation.
Reply from Jeffery Horner contained links to the
revolution-computing.com webpage which had information pertaining to
the Bay Users R group Meetup on Web Dashboards with R.
I have a very specific project that I need to implement.
I wish to use the graphics capabilities provided by Adobe FLEX to
visualise outputs from R.
2011 Aug 27
3
Exception while using NeweyWest function with doMC
Dear R users,
I am using R right now for a simulation of a model that needs a lot of
memory. Therefore I use the *bigmemory* package and - to make it faster -
the *doMC* package. See my code posted on http://pastebin.com/dFRGdNrG
Now, if I use the foreach loop with the addon %do% (for sequential run) I
have no problems at all - only here and there some singularities in
regressor matrices which