Questions tagged [robust]
152 questions
11
votes
2 answers
Robust Standard Errors in lm() using stargazer()
I have read a lot about the pain of replicate the easy robust option from STATA to R to use robust standard errors. I replicated following approaches: StackExchange and Economic Theory Blog. They work but the problem I face is, if I want to print my…

HAL_71
- 111
- 1
- 1
- 3
9
votes
3 answers
Replicating Stata Probit with robust errors in R
I am trying to replicate a Stata Output in R. I am using the dataset affairs. I am having trouble replicating the probit function with robust standard errors.
The Stata code looks like that:
probit affair male age yrsmarr kids relig educ…

Semprini
- 91
- 3
9
votes
7 answers
Python for a hobbyist programmer ( a few questions)
I'm a hobbyist programmer (only in TI-Basic before now), and after much, much, much debating with myself, I've decided to learn Python. I don't have a ton of free time to teach myself a hundred languages and all programming I do will be for personal…

Kefka
- 1,655
- 2
- 15
- 25
6
votes
2 answers
Is it appropriate to calculate r-squared of robust regression using rlm
I am using rlm function from MASS to perform a robust regression. Unlike lm,the summary function does not return a valure for r-squared.
Is therefore appropriate to calculate this using 1 - sum(residual^2)/(sum((Y-mean(Y))^2)?
(apologies for the…

Electromagnet
- 161
- 1
- 5
6
votes
1 answer
MM robust estimation in ggplot2 using stat_smooth with method = "rlm"
The function rlm (MASS) permits both M and MM estimation for robust regression. I would like to plot the smoother from MM robust regression in ggplot2, however I think that when selecting method = "rlm" in stat_smooth, the estimation method…

Katerina Rapti
- 75
- 1
- 4
6
votes
2 answers
Panel data regression: Robust standard errors
my problem is this: I get NA where I should get some values in the computation of robust standard errors.
I am trying to do a fixed effect panel regression with cluster-robust standard errors. For this, I follow Arai (2011) who on p. 3 follows…

Jan
- 85
- 1
- 6
5
votes
2 answers
What is a sorting algorithm that is robust to a faulty comparison?
I want to sort a list of n items with a comparison sort. However, one of the comparisons made by the algorithm will be flipped from what it's supposed to be. Specifically, there is one pair of items for which the comparator function consistently…

chausies
- 765
- 7
- 20
5
votes
1 answer
Does the Sandwich Package work for Robust Standard Errors for Logistic Regression with basic Survey Weights
I am running logistic regressions with a panel data set from survey data and I want to correct the standard errors for the panel design. The weights included in this survey account for sampling probability, panel mortality and post…

JMueller
- 123
- 7
5
votes
1 answer
Robust standard errors for clogit regression from survival package in R
I am trying to get robust standard errors for a clogit regression from the survival package in R. In doing so, I am trying to replicate the standard errors reported by the Stata clogit command with the vce(robust) option.
My formula in R is…

Phil
- 954
- 1
- 8
- 22
5
votes
1 answer
Is there PTHREAD_MUTEX_ROBUST equivalent in Mac OS X?
I'm using a pthread_mutex_t with PTHREAD_PROCESS_SHARED on a shared memory to do synchronization between different processes.
The mutex maybe deadlocked if a process exits but leaves the mutex locked. There is a PTHREAD_MUTEX_ROBUST in POSIX…

Sswater Shi
- 189
- 8
5
votes
1 answer
Which function/package for robust linear regression works with glmulti (i.e., behaves like glm)?
Background: Multi-model inference with glmulti
glmulti is a R function/package for automated model selection for general linear models that constructs all possible general linear models given a dependent variable and a set of predictors, fits them…

jonlemon
- 111
- 5
3
votes
1 answer
R plm vs fixest package - different results?
I'm trying to understand why R packages "plm" and "fixest" give me different standard errors when I'm estimating a panel model using heteroscedasticity-robust standard errors ("HC1") and state fixed effects.
Does anyone have a hint for me?
Here is…

minimouse
- 131
- 10
3
votes
1 answer
`glmRob()` does not predict when given `newdata` argument
The following is some slightly modified code from the glmRob() examples. When given the newdata argument, predict.glmRob() errors out. Am I doing something wrong?
suppressMessages(library(robust))
data(breslow.dat)
bres.rob <- glmRob(sumY ~ Age10 +…

Rory Nolan
- 972
- 10
- 15
3
votes
0 answers
How to get robust standard errors in multilevel quasipoisson using glmmpql in R
I am wondering if I can calculate robust standard errors and how I can do it (if possible) after multilevel quasipoisson using glmmpql.
An example would be the following code:
glmmPQL(nabs ~ gen + sco + pedu, random = ~ 1 | region/school, family =…

Young
- 31
- 4
3
votes
1 answer
How to accelerate the computation of leverage (diagonals of hat matrix) in least square regression?
For robust fitting problem, I want to find outliers by leverage value, which is the diagonal elements of the 'Hat' matrix. Let the data matrix be X (n * p), Hat matrix is:
Hat = X(X'X)^{-1}X'
where X' is the transpose of X.
When n is large, Hat…

areslp
- 383
- 1
- 4
- 17