Linear Regression - Robust standard error

Discuss the jamovi platform, possible improvements, etc.
Jorge
Posts: 22
Joined: Thu Apr 01, 2021 8:44 pm

Re: Linear Regression - Robust standard error

Post by Jorge »

jonathon wrote:i am not sure.

i would need to look into it further.

jonathon
I understand that, but in fact it would be a great feature to include in jamovi. In almost all cases, there is heteroskedascity and not dealing with it implies that we cannot do any statistical inference.

I'll be waiting for this update. :)

Thank you for your time.

Cheers,
Jorge
Carlos
Posts: 1
Joined: Sat Apr 24, 2021 2:12 pm

Re: Linear Regression - Robust standard error

Post by Carlos »

Hello,

I teach statistics to political science students. The robust standard error is important for us, both in linear and logistic regressions.

Will it be incorporated in jamovi? If so, do you know when?

Thank you.
rconroy
Posts: 5
Joined: Thu Jan 30, 2020 12:13 pm

Re: Linear Regression - Robust standard error

Post by rconroy »

I cannot stress how important robust variance estimation is in real life. The problem with traditional statistical methods is that they assume a uniform population to sample from. In fact all populations are lumpy. There are clusters of people who are more similar than they would be in a uniform population. This unobserved and often unobservable heterogeneity will reduce the standard error, making confidence intervals too narrow and p-values too small.

Huber-White variance estimation is now industry standard for real life research, and having it in jamovi would be really, really useful. It would help to move jamovi from a being really useful teaching app to a really useful app.
Jorge
Posts: 22
Joined: Thu Apr 01, 2021 8:44 pm

Re: Linear Regression - Robust standard error

Post by Jorge »

Hi Jonathon,

I hope you are well.

Any news regarding this robust estimation issue? It would be very important to have this feature in jamovi. I will start my stats class in september and would like to use jamovi. :)

Thanks,
Jorge
User avatar
jonathon
Posts: 2609
Joined: Fri Jan 27, 2017 10:04 am

Re: Linear Regression - Robust standard error

Post by jonathon »

hi,

sorry, haven't found time for it yet. do you think you can could extract some funding from your uni? that would help.

cheers

jonathon
Jorge
Posts: 22
Joined: Thu Apr 01, 2021 8:44 pm

Re: Linear Regression - Robust standard error

Post by Jorge »

Hi,

I would be happy to do it, but as you probably know, my univ is paying for SPSS. If I could convince them of using jamovi and drop SPSS, I might be able to get fund, but they would need to see jamovi as a real alternative (meaning, having the features we use in class with students). So far I haven't been successful as they recognize jamovi is very interesting but lacks one or two relevant commands/items that we really need (e.g., robust standard error)

I hope you'll have some time to include this feature in jamovi in the near future.

Thank you.

Cheers,
Jorge
User avatar
jonathon
Posts: 2609
Joined: Fri Jan 27, 2017 10:04 am

Re: Linear Regression - Robust standard error

Post by jonathon »

re: robust standard errors ... this is something which involves bootstrapping? and allowing the user to specify the number of samples?

jonathon
Jorge
Posts: 22
Joined: Thu Apr 01, 2021 8:44 pm

Re: Linear Regression - Robust standard error

Post by Jorge »

Hi,

Robust standard errors in linear regression are used when there is heteroskedascity, i.e., the variance of the random term u is not constant. Analitically, that just implies using a different formula for the computation of the standards errors (thus, I guess bootstrapping is not necessary).

Some messages ago in this same post, Maurizio posted a R code that does the work:
MAgojam wrote:
Jorge wrote:I would be grateful if you could give me details on this.
Hi Jorge,
with pleasure.

In the attached screenshot you will see a simple comparison between Stata and Jamovi with the R environment of the Rj module.
STATA_RJ_rse.PNG
The file used in jamovi in ​​the previous post is a file that you can recall in Stata (sysuse auto).
Always in State with: regress mpg turn trunk
gets an output with Std. Err. (Not Robust)
while with: regress mpg turn trunk, vce(robust)
you will get an output with Robust St. Err.
In Rj you have the possibility to use an R environment and the relative libraries of functions that jamovi brings with its installation.

In Rj with data you refer to the file you have opened in jamovi and with the following line of code:
lm_model <- lm(mpg ~ turn + trunk, data = data)
using the assignment operators "<-" you pass the object of the regression function
lm(mpg ~ turn + trunk, data = data)
to the lm_model variable (choose a name that remembers what it is), which can be used individually or in other functions, without the need to repeat the regression again.

To obtain an output similar to that of Stata
regress mpg turn trunk
with (NOT Robust) Std. Err. use this line of code:
summary(lm_model)

To obtain an output similar to that of Stata
regress mpg turn trunk, vce(robust)
with Robust Std. Err. use the new function above with this line of code:
summary_rse(lm_model, "hc1")

Cheers,
Maurizio
I hope this helps. If you need any other information, please let me know :)

With thanks,
Jorge
Jorge
Posts: 22
Joined: Thu Apr 01, 2021 8:44 pm

Re: Linear Regression - Robust standard error

Post by Jorge »

Hi Jonathon,

I hope you are well.

Any news regarding this issue of robust standard error? I am asking because the new academic year will begin soon and I would really like to use jamovi in my Stat classes.

I would like to add that the R code for this issue has been written (as you can see in the last post).

With thanks,
Jorge
User avatar
jonathon
Posts: 2609
Joined: Fri Jan 27, 2017 10:04 am

Re: Linear Regression - Robust standard error

Post by jonathon »

hi jorge,

sorry, i haven't found the time to work on this yet.

jonathon
Post Reply