Questions tagged [standard-error]

The standard error is the standard deviation of the sampling distribution of a statistic. The term may also be used to refer to an estimate of that standard deviation, derived from a particular sample used to compute the estimate

Filter by
Sorted by
Tagged with
0 votes
0 answers
25 views

Error Bars Do NOT Match Multiple Linear Regression Model

I am trying to fit a linear mixed model using the lme4 package. Every model I try says that 2a and 1a are not significant. I am curious as to why the error bars do not match what I am seeing in the ...
user23002094's user avatar
0 votes
0 answers
14 views

Stargazer() and starprep() with different robust clustered standard errors [R]

Introduction I need to replicate this regression table in R: regression table from study I successfully replicated each individual regression model (1 - 4c) and can display them individually with the ...
Anton Wild's user avatar
0 votes
1 answer
33 views

Quantify confidence on a difference between two groups [duplicate]

I am looking to quantify certainty/confidence on a difference between two groups (see toy dataset): # Create dataframe df<-data.frame( Age=c(40,40,40,40,41,41,41,41), Strength=c(50,49,46,46,...
PhelsumaFL's user avatar
0 votes
0 answers
29 views

Type of Standard Errors using PLM Package

Suppose I ran the following R code: plm(Y ~ X1 + X2, data = df, effect = "twoways", model = "within", index = c("country", "year")) That is, I have panel data ...
TFT's user avatar
  • 141
1 vote
0 answers
20 views

Calculate SE and SD in mixed ANOVA

I have conducted a mixed-design ANOVA with a between-subjects factor (Group: Control Group [0] vs. Intervention Group [1]) and a within-subjects factor (Time: Baseline [0], Follow-up 1 [1], and Follow-...
Manuel Leitner's user avatar
1 vote
1 answer
55 views

Using purrr::map over lmtest::coeftest with the cluster argument calling a variable with the "~" symbol

I am failing to iterate using map (purr package) over the coeftest function (lmtest package) when I specify the argument “cluster.” This argument uses the “~” symbol to call a variable to estimate ...
edo's user avatar
  • 75
0 votes
0 answers
70 views

Clustered standard errors with panel data in survregbayes

I'm currently working with a panel dataset containing information on 7903 cities from 2012 to 2022. My focus is on studying the digitalization of city administrations using survival models. ...
Ste's user avatar
  • 1
0 votes
0 answers
65 views

Linear regression value errors with Scipy

I have two data arrays, xdata of shape (40,) and ydata of shape (40, 721, 1440) (time, lat, lon). My final goal is to compute the regression slope between these two datasets and obtain the errors from ...
Megan Franke's user avatar
0 votes
0 answers
25 views

How to calculate relative effect in mma R package

R code like this: library(mma) data <- subset(d,d$RACE=="1-White" | d$RACE=="3-Black") x <- data[, c("AGE","GENDER","EMPLOYMENT", "PIR"...
H Luei's user avatar
  • 1
0 votes
2 answers
124 views

Using cluster-robust SEs within a zero-inflated negative binomial model through ggpredict won't return confidence intervals

I've been trying to apply cluster-robust standard errors in my calculation of the marginal effects of two predictor variables (main effects and their interaction) in a ZINB model. The code works ...
Nate Phillips's user avatar
0 votes
1 answer
45 views

How to add a linear fit to the ggplot graph, when the axis are logarithmic?

I have this following data frame and I calculate a fit line (p) based on logarithmic values of X and Y. library(ggplot2) df <- data.frame (Xvalue=c(0.05, 1, 300, 500, 800), Yvalue=...
Reza's user avatar
  • 25
0 votes
1 answer
43 views

Estimation of speed from log/Lat co-ordinates?

I have some vehicle based GNSS data. The data is GNSS time to a precision of 1 second and the corresponding lat and long coordinates in decimal degrees. The data sampling was inconsistent, ie not ...
JJS's user avatar
  • 1
0 votes
0 answers
36 views

How can I obtain robust standard errors for a spatial IV regression in R using the sphet package?

I am running a spatial error model in R using the sphet package with spatial weights. The function I am using is spreg(). Something that is confusing me is the validity of standard errors generated ...
mirrror's user avatar
0 votes
0 answers
48 views

Generalized ordered regression with clustered standard error using the vglm function

I am working with an ordinal outcome variable (state_prev) measuring sexual violence prevalence, using a generalized ordered regression. I fitted the model: sup_state <- vglm(state_prev ~ ext_sup + ...
chf's user avatar
  • 1
0 votes
0 answers
29 views

Generating standard errors in poLCA function

I am using the poLCA function in R. I am wondering if there is a way to generate standard errors (along with probabilities) using this function? So far, I have tried using the arguments prob.se and P....
cake2244's user avatar
0 votes
0 answers
52 views

KeyError while using mt.reg (econtools)

I'm using mt.reg to compute Conley standard errors but get this error: KeyError: 'id' I'm doing this simple regression shac_params = { 'x': 'lon', 'y': 'lat', 'kern': 'tria', '...
TEC's user avatar
  • 53
0 votes
1 answer
82 views

How to get the exact same standard errors obtained in Stata when reproducing survival analysis in R?

I am reproducing in R some survival analysis results published in a journal. The original results were produced in Stata. Here are the original results: Here is the code to produce these results in R:...
w5698's user avatar
  • 179
0 votes
0 answers
38 views

Adding clustered standard errors to trend line in scatter plot

I want to show the difference in price trend for two types of observations, one treated and one control group. For this, I created a simple graph: linearity_plot <- ggplot(df, aes(x = year, y = ...
DunkinDont's user avatar
0 votes
1 answer
68 views

Extending error bars in both directions (non-symmetrical), base R, Dynamite Plot

I have written a code to display a dynamite plot the way I like (I modified a function I found on github) I have made a mock data set for the example, and have been playing around with the code to try ...
Andy's user avatar
  • 423
0 votes
1 answer
34 views

R - problem with creating a grouped bar chart with precise limits

I am trying to create a grouped bar chart with 4 bars in total (wish of men with no support, wish of women with no support, wish of men who received support, wish of women who received support), plus ...
Iris W's user avatar
  • 1
0 votes
0 answers
13 views

Heteroskedasticity robust standard errors using wbm() function from package 'panelr'

I'm using the package 'panelr' in order to use the within-between model through the function wbm(). Now I want to implement the heteroskedasticity robust standard errors for my coefficients, but I ...
mrf6345's user avatar
  • 31
0 votes
0 answers
106 views

coeftest vcovHC gives me NaN while estimating standard error

I'm trying to estimate day-of-week or month-of-week (etc) effect on daily returns of some crypto, i have dummy for each day of the week and for each month of the year, i also have a panel for about 5 ...
Alessandro Marchetti's user avatar
0 votes
0 answers
34 views

Python: RLM with HAC standard errors

I am trying to run a robust (to outliers) regression in Python using sm.RLM and while computing the p-values of the estimated coefficients I want to use HAC (heteroskedasticity and autocorrelation ...
alisnngl's user avatar
0 votes
0 answers
45 views

Standard error of geometric mean of values in Pandas after groupby

I have a pandas dataframe with time col (Week) and a value col (Impressions). I want to find the geometric mean and standard error of the Impressions col, grouped by per week. The caveat over here is, ...
pandi20's user avatar
  • 11
0 votes
0 answers
56 views

dist_cutoff in conleyreg in R

I want to estimate Conley standard errors in R.I understand that there is conleyreg function. However, the function uses one value in km for dist_cutoff. I want to allow for correlation within a ...
Anisha Garg's user avatar
0 votes
1 answer
71 views

Can I correct the coefficient standard errors after oversampling my data?

I am trying to fit a fixed effects linear regression to my data and interpret the coefficients. I have an imbalanced dataset (~97% negative cases), which was affecting my ability to fit the model and ...
cbowers's user avatar
  • 147
0 votes
0 answers
26 views

R tests for trend with summary coefficient and standard errors

I have the beta coefficient and standard error for the treatment effect of four independent groups and I want to test for a trend in the effect size across these four groups. Is there a way to test ...
nwan5905's user avatar
1 vote
1 answer
63 views

Different standard error estimations from linearmodels and statsmodels package

Here are reproducible codes: import pandas as pd # Outer is entity, inner is time entity = list(map(chr,range(65,91))) time = list(pd.date_range('1-1-2014',freq='A', periods=4)) index = pd.MultiIndex....
StatsNoob's user avatar
  • 380
3 votes
1 answer
277 views

sandwich is not providing the same covariance matrix for a poisson regression fit with an offset

Poisson regression can be fit to raw data or can be fit by summarizing data and then using an offset. The model should return the same coefficient estimates (as well as covariance estimates), ...
Demetri Pananos's user avatar
1 vote
1 answer
276 views

Custom Standard Errors with Statsmodels / Stargazer

I am running a series of OLS regressions in Python, where I am using standard errors that I calculate using a custom function. I am now exporting my regression results into tables, and plan on using ...
lithium123's user avatar
0 votes
0 answers
31 views

Wrong Conjoint Analysis Outputs in SPSS

Why do i get Kendall-Tau = 1 despite the rankings are not similar? And why do i get the same standard error for every part worth utility? Can someone help? Cards Respondents data Syntax Outputs
Tim Emmermacher's user avatar
0 votes
0 answers
159 views

Two-way Fixed Effects Model: Clustering Standard Errors

I'm running a two way fixed effects regression in R with "firmID" and "Year" as indexes in the model specification.  I have provincial data and would like to be able to cluster the ...
bacca's user avatar
  • 5
2 votes
1 answer
300 views

PyTorch: Compute Hessian matrix of the model

Say that, for some reason, I want to fit a linear regression using PyTorch, as illustrated below. How could I compute the Hessian matrix of the model to, ultimately, compute the standard error for my ...
Álvaro A. Gutiérrez-Vargas's user avatar
1 vote
1 answer
255 views

Plot standard error in base r scatterplot [duplicate]

I am well aware of how to plot the standard error of a regression using ggplot. As an example with the iris dataset, this can be easily done with this code: library(tidyverse) iris %>% ggplot(...
Shawn Hemelstrand's user avatar
0 votes
0 answers
22 views

Understanding standard error of the spread

I'm doing a HarvardX course on Data Science, and in it they are talking about "standard error of the spread". Now, no matter how hard I try to imagine what a standard error of spread would ...
tensai's user avatar
  • 71
0 votes
1 answer
226 views

Conley standard errors

Is there a rule of thumb for the selection of the radius (cut-off) regarding spatial correlation? I use Conley standard errors in my models. I could not find explanations on the internet and my ...
Shunrei's user avatar
  • 189
1 vote
0 answers
156 views

Calculating Newey-West Standard Errors for a Distributed Lag Model (in R)

This is my first post, so please suggest any improvements to the title or question itself. I am regressing two xts objects, and want to re-estimate several distributed lag regression models using ...
danFM's user avatar
  • 11
1 vote
1 answer
344 views

Rolling Window Regression

I need to compute rolling window regressions in Python where the standard errors are corrected for HAC (Newey-West, 1987). I know that statsmodels has a function for rolling window regressions (...
MF1992's user avatar
  • 85
1 vote
1 answer
837 views

Clustered standard errors, stars, and summary statistics in modelsummary for multinom models

I want to create a regression table with modelsummary (amazing package!!!) for multinomial logistic models run with nnet::multinom that includes clustered standard errors, as well as corresponding &...
VHeddesheimer's user avatar
1 vote
1 answer
1k views

Cluster-Robust Standard Errors for Lmer and Glmer in Stargazer (lme4 package)

I have an experimental data set in which subjects were assigned to a specific treatment. Each treatment consisted of 5 groups. I want to estimate a model that that includes random effects on subject ...
Matthias Herrmann's user avatar
0 votes
1 answer
215 views

The standard error in Poisson model vs bootstrapped SE

I was trying to compare the SEs from two approaches: the SE printed in the results section in the GLM poisson model, vs. the SE of the coefficient I got from bootstrapping (basically I resampled the ...
user3669725's user avatar
0 votes
0 answers
237 views

Issue with getting robust SEs using Sandwich, merDeriv and glmer of lme4

I would like to get robust estimate of standard error for glmer of lme4. I used the following code that combines sandwich and merDeriv, which previously worked, but now I get an error: a = lme4::glmer(...
Tsachi Ein Dor's user avatar
0 votes
0 answers
62 views

R: Least squares estimation in linear equation systems

I'm going to estimate some parameters of linear equation systems with repeated measures. My equations will look like this: Variant1: Variant2: At least 10 values (repeated measures; technical ...
Anti's user avatar
  • 365
1 vote
1 answer
481 views

How do i extract the standard error from a gaussian GLM model?

I wish to extract the standard error from my Gaussian GLM and my poisson GLM if anyone knows how i can do this? code for simulated data and both models are below; #data simulated before fitting models ...
Joe's user avatar
  • 829
0 votes
0 answers
268 views

R: Double Clustering of Standard Errors in Panel Regression

so i am analysing fund data. I use a fixed effect model and want to double cluster my standard errors along "ISIN" and "Date" with plm(). output for dput(data) is : > dput(nd[1:...
krahllu's user avatar
  • 11
0 votes
1 answer
198 views

estimate standard error from sample means

Random sample of 143 girl and 127 boys were selected from a large population.A measurement was taken of the haemoglobin level(measured in g/dl) of each child with the following result. girl n=143 mean ...
bishwajit bhattacharya's user avatar
0 votes
0 answers
56 views

SSM model Standard errors Matlab covariance matrix

Does anybody know please how to obtain standard errors of estimates parameter in SSM model matlab? or how to get them from covariance matrix?
Marcelo Dorelis's user avatar
0 votes
1 answer
415 views

how can i specify the cluster in the regression model with felm() function

how can I specify the cluster in the regression model with felm() function: I have been trying and trying but I can't make it work. Does anyone know what is wrong with my code? This is the code I have ...
whoknows's user avatar
0 votes
2 answers
1k views

how to calculate standard error of all variables by group

I have dataframe contain variables : Group high weigh age col5 row1 A 12 57 18 AA row2 C 22 80 29 BB row3 B 17 70 20 CC row4 A 13 60 ...
Reda's user avatar
  • 449
1 vote
1 answer
642 views

How to plot coefficients with robust standard errors?

I have this LSDV model using the "lm()" function and adding the country dummy variables minus the intercept. Then I made robust standard errors in order to fix heteroskedasticity and ...
mrf6345's user avatar
  • 31

1
2 3 4 5
7