# Tag Info

### Robust regression inference and Sandwich estimators

One can use an alternative summary function to perform a robust regression. lm.object <- lm(a~b+c) summary(lm.object, robust=TRUE) To obtain robust standard ...
• 111
Accepted

### How to calculate sandwich standard errors for generalized least squares models?

Generalized least squares jointly models fixed effects and a covariance structure in data to yield Gauss-Markov optimal estimators of the fixed effects. We can also refer to the fixed effects as the "...
• 63.5k
Accepted

### Standard Errors with Weighted Least Squares Regression

Essentially you already computed everything you need. The missing piece is just that the sig_i should be the residual standard error divided by the corresponding ...
• 15.8k

### How to estimate robust sandwich standard errors when estimating parameters using optim() in R?

It is in principle possible but potentially burdensome, especially if you have many observations. The reason is the following: For the full sandwich you need the "bread" for which the observed Hessian ...
• 15.8k

### Difference between Quasi-Poisson and Sandwich Covariance

From a purely applied perspective, my experience is that the difference between these methods is typically not huge, leading to qualitatively the same conclusions (see Table 2 in the vignette you ...
• 15.8k

### Robust Residual standard error (in R)

If you are interested in the conditional mean $\mathop{\mathbb{E}} \bigl[ y_j|X_j \bigr] = X_j' \beta$, where $X_j$ may be in or out of sample, then of course you can get the standard error for that ...
• 31.9k

### effect estimate without constant variance (r sandwich vcovHC)

When using the sandwich standard error, the association between $X$ and $Y$ is no different than in the model: the regression slope, or "X" coefficient is the same ...
• 63.5k

### How to estimate robust sandwich standard errors when estimating parameters using optim() in R?

You can use a bootstrap. The sandwich covariance estimator is a first order approximation to the bootstrap, and the overlap of robustness properties is substantial. The only disadvantage to this ...
• 63.5k
Accepted

### Can a subject appear multiple times in a risk set in recurrent event analyses?

The counting process analysis might be better described as an analysis of "times to events" rather than of "time to first event." Therneau and Grambsch describe various approaches ...
• 94.6k
1 vote

### How can I tell if a clutser-randomised crossover trial has made a unit of analysis error?

The 'two-sided' test indeed means they consider deviations of the test statistic in both the negative and positive sense (lower and upper tail). A two-sided $\alpha=0.05$ is very standard, if you were ...
• 5,153
1 vote

### what does generalized estimating equations with robust standard error mean

Here is an example of how to do this using the lalonde dataset in cobalt, where treat is a ...
• 34.6k
1 vote

### How to compute sandwich estimator with QMLE and Poisson regression in R (using glmrob package)

There may not be a way to do this (i.e., it hasn't been developed statistically yet). You can use a non-robust Poisson QMLE just using glm(., family = quasipoisson) ...
• 34.6k
1 vote

### How to compute the sandwich variance ML estimator in R

I just found the answer to my problem by comparing the manual method versus the QMLE robust standard errors for a GARCH using the package fGarch. The solution is as ...
1 vote
Accepted

### Decision between vcovPC and vcovPL (sandwich)

The answer depends on the type of panel you have. The vcovPL() approach can only work well if the panels are long enough so that the autocorrelation over time can ...
• 15.8k
1 vote
Accepted

### Robust SE clustered GLM Gamma Log Link to match GEE Robust SE

I've tried to follow this post and these directions but neither give me the correct robust SE. I figure you are missing the cadjust argument. You can either create ...
1 vote

### How to determine if correlated errors are a result of using an incorrect functional form?

First of all applying linear regression may be flawed due to needed lag structures in the causals and very possibly anomalies in any series. The suggested approach is to form a Transfer Function (...
• 30k
1 vote
Accepted

### Variance Estimation for Least Squares with Probability Weights

You can use the survey package, but if you want more flexibility in how the standard errors are computed, you need to use the ...
• 34.6k
1 vote
Accepted

### Wondering what type of covariance correction for standard errors is better: Hansen-Hodrick or Newey-West?

statsmodels uses by default Newey-West corrected standard errors with the usual Bartlett window. There is a 'weights_func' or 'kernel' option to choose a different window than Bartlett, eg. uniform. ...
• 3,292
1 vote

### How to implement the sandwich estimator in a semi-parametric situation?

The sandwich estimator does not pertain only to maximum likelihood. It is often used with maximum likelihood and if you estimate a correctly specified model then you obtain the information matrix as ...
• 359
1 vote
Accepted

### Reference for incremental sandwich covariance from biglm?

There isn't a reference, because it's too minor to be publishable. I've put the computations here. It's just algebra: multiplying out the middle term of the sandwich estimator and collecting terms so ...

Only top scored, non community-wiki answers of a minimum length are eligible