Displaying 20 results from an estimated 241 matches for "sandwich".
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.
Wh...
2006 Aug 25
0
sandwich: new version 2.0-0
Dear useRs,
a new version 2.0-0 of the sandwich package for estimating sandwich
covariance matrices is available from the CRAN mirrors.
The tools for computing heteroskedasticity (and autocorrelation)
consistent covariance matrix estimators (also called HC
and HAC estimators, including the Eicker-Huber-White estimator)
have been generalized ove...
2013 Apr 05
1
white heteroskedasticity standard errors NLS
Hello
Is there any function to calculate White's standard errors in R in an NLS
regression.
The sandwich and car package do it but they need an lm object to calculate
the error's.
Does anyone have idea how to do it for an NLS object ?
Regards
The woods are lovely, dark and deep
But I have promises to keep
And miles before I go to sleep
And miles before I go to sleep
-----
[[alternative HTML ver...
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 packag...
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 packag...
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 not necessarily within groups. Can I calculate the standard
errors with robust variance, in complex sample survey data using R?
Outputs:
design_tarv<-...
2012 Oct 27
0
[gam] [mgcv] Question in integrating a eiker-white "sandwich" VCV estimator into GAM
...ors, and
potentially heteroskedasticity. The Ruppert et al textbook on
semiparametric regression uses GLS to account for correlated errors. I
haven't really used GLS much and I don't think it solves the
autocorrelation problem. I'm more accustomed to using a cluster-robust
"sandwich" estimator:
(X'X)^{-1} (sum_j(X_j' e_j e_j' X_j)) (X'X)^{-1}
In a penalized spline context, this would be something like the following:
(X'X+\lambda K)^{-1} (sum_j(X_j' e_j e_j' X_j)) (X'X+\lambda K)^{-1}
(where J are clusters -- units on whom obser...
2008 Jul 04
4
Re ad in a file - produce independent vectors
Is there a way of reading in a file in a way that each line becomes a vector:
for example:
meals.txt
breakfast bacon eggs sausage
lunch sandwich apple marsbar crisps
dinner chicken rice custard pie
I want to read in this file and end up with 3 different vectors, one called
breakfast which contains "bacon", "eggs", sausage" One called lunch with
"sandwich", "apple"... etc
So...
2008 May 08
2
poisson regression with robust error variance ('eyestudy
...$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 "sandwich" package (thanks to Achim Zeileis), you get "almost" the
same numbers as that Stata output gives. The estimated b's from the
glm match exactly, but the robust standard errors are a bit off.
### Paul Johnson 2008-05-08
### sandwichGLM.R
system("wget http://www.ats.ucla.edu...
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
2005 Jan 14
1
empirical (sandwich) SE estimate in lme ()?
Is it possible to get the empirical (sandwich) S.E. estimates for the
fixed effects in lme () (thus allowing possibly correlated errors within
the group)? In SAS you can get it by the 'empirical' option to PROC MIXED.
Cheers,
Michael
--
Na (Michael) Li, Ph.D.
Division of Biostatistics A443 Mayo Building, MMC...
2010 Oct 13
1
robust standard errors for panel data
...ndard errors for that. In particular, I am
worried about potential serial correlation for a given individual (not so
much about correlation in the cross section).
>From the documentation, it looks as if the vcovHC that comes with plm
does not seem to do autocorrelation, and the NeweyWest in the sandwich
package says that it expects a fitted model of type "lm" or "glm" (it
says nothing about "plm").
How can I estimate the model and get robust standard errors?
Thanks for your help.
Max
2007 Oct 30
1
Some matrix and sandwich questions
Dear R-help,
I have a four-part question about regression, matrices, and sandwich package.
1) In the sandwich package, I would like to better understand the
meat() function.
>From the bread() documentation, for a simple OLS regression, bread() returns
(1/n * X'X)^(-1)
That is, for a simple regression (per the documentation on bread()):
MyLM <- lm(y ~ x)
bread(MyLM)...
2007 Sep 19
3
Robust or Sandwich estimates in lmer2
Dear R-Users:
I am trying to find the robust (or sandwich) estimates of the standard error of fixed effects parameter estimates using the package "lmer2". In model-1, I used "robust=TRUE" on the other, in model-2, I used "robust=FALSE". Both models giving me the same estimates. So my question is, does the robust option works...
2010 Jul 15
1
Longitudinal negative binomial regression - robust sandwich estimator standard errors
...er of
'events' that occurred since the previous visit.
~50k rows, ~2k unique subjects so ~25 rows/visits per subject, some have 50
some have 3 or 4.
In STATA there is an adjustment for the fact that you have multiple rows per
subject, in that you can produce robust standard errors using sandwich
estimators, to control for the fact there is a correlation structure within
each subjects set of visits. This function is reasonably straight forward,
however I'm trying to find something similar in R.
http://www.stata.com/help.cgi?nbreg
http://www.stata.com/help.cgi?vce_option
I'll admi...
2010 Jun 08
2
how to ignore rows missing arguments of a function when creating a function?
...don't want my function to drop rows if there are missing
arguments elsewhere in a row, ie for variables that are not arguments of my
function.
As an example: here is a clustering function I wrote:
cl <- function(dat, na.rm = TRUE, fm, cluster){
attach( dat , warn.conflicts = F)
library(sandwich)
library(lmtest)
M <- length(unique(cluster))
N <- length(cluster)
K <- fm$rank
dfc <- (M/(M-1))*((N-1)/(N-K))
uj <- data.frame(apply(estfun(fm),2, function(x) data.frame(tapply(x,
cluster, sum)) ) );
vcovCL <- dfc*sandwich(fm, meat=crossprod(uj)/N)
coeftest(fm, vcovCL)
}...
2006 Dec 10
1
Use of bread() function
Hello,
I am trying to extract an estimator for the bread of the sandwich
function. I used bread(fitted model) however it seems that I have missed
something as an error message "no applicable method for "bread" appears.
My fitted model is a Spatial simultaneous autoregressive error
model.(errorsarlm in spdep package)
Can anyone please tell me what I migh...
2009 Mar 03
2
latex output of regressions with standardized regression coefficients and t-statistics based on Huber-White
...w to R and have only used SPSS befor this (which
can't do this at all...).
I'm trying to output some regression results to latex. The regressions
are normal OLS and I'm trying to output the results with standardized
regression coefficients and t-statistics based on "Huber-White sandwich
estimator for variance". The final result should be one big table for
several regressions with this data (and N, R^2).
I found the mtable package, which does what I need for lm(...)
regressions, lm.beta to output standardized coefficients and package
"sandwich" to output the cor...
2010 Oct 14
1
robust standard errors for panel data - corrigendum
...have robustness along the "big" dimension is some sort of nonparametric truncation. So:
** 1st (possible) solution **
In my opinion, you would actually need a panel implementation of Newey-West, which is not implemented in 'plm' yet. It might well be feasible by applying vcovHAC{sandwich} to the time-demeaned data but I'm not sure; in this case, vcovHAC should be applied this way (here: the famous Munnell data, see example(plm))
> library(plm)
> fm<-log(gsp)~log(pcap)+log(pc)+log(emp)+unemp
> data(Produc)
> ## est. FE model
> femod<-plm(fm, Produc)
> #...
2010 May 14
1
Creating an S3 method when the generic function is defined in another (imported) package
Hi,
In one of my packages (maxLik), I would like to add an S3 method,
where the generic function (estfun) is defined in another package
(sandwich). Everything works fine if my package "Depends" on the other
package and I import the generic function "estfun" from the "sandwich"
package and define the new method in the NAMESPACE file. However, I
prefer not to load the entire other package just to use a single
gene...