# Questions tagged [weighted-regression]

Weighted least squares regression is a generalization of OLS regression used when different data points have different importance, or "weights". See also [weighted-data].

366 questions
Filter by
Sorted by
Tagged with
22 views

### Weighted least squares estimator variance using noisy weights

I have a linear system with uncorrelated, heteroscedastic noise, $Y \propto \mathcal{N}(Xβ,Σ)$ where $Σ$ is a diagonal matrix with elements $σ_{ii}^2$. The MLE is given by weighted least squares (WLS) ...
21 views

### Weighted regression with no variance within cluster

Given a clustered data set with no variation within a cluster, shouldn't a regression weighted with the inverse cluster size give the same results as a regression with only one observation per cluster?...
1 vote
24 views

### Seeking Feedback on Mixed-Effects Model with Weighted Observations

I've been working on a project where I'm comparing different methods using a mixed-effects model, and I'd appreciate some feedback on my approach. Background: I have a dataset with several variables: ...
1 vote
26 views

### Matching weights vs 'weighting' weights?

What is the difference between matching weights obtained from full matching (with propensity score or mahalanobis distance, using MatchIt and then match.data in R) and the "weighing" weights ...
12 views

### Generalized Linear Model optional weights

In Introduction to General and Generalized Linear Models by H. Madsen & P. Thyregod, the ML estimator for $\beta$ is defined in eq. 4.42 (p.106) as W(\beta) = \text{diag}\bigg\{\frac{w_i}{g'(\...
24 views

### Performing a Bayesian (or Bayesian-like) linear regression

I'm trying to model the relationship between two variables. Without going into details on how I get this expectation, my belief on the relationship between the variables looks like this: However, as ...
1 vote
31 views

### Treatment Effect Insignificant with OLS but Significant After IPTW

I'm working with some observational data and wanted to assess the effect of variable (D) on outcome (Y) after controlling for a vector of covariates (X). As the data is observational, I wanted account ...
1 vote
24 views

### Cluster uncertainty in Linear Regression

Is it possible to introduce cluster probabilities into a regression? Consider the Old Faithful Geyser data set. Most clustering algorithms find 2 clusters when analysing eruption times and waiting ...
20 views

### How to summarize a weighted regression in research paper

New here so apologies if I'm not doing this right. I'm writing up a research paper and my advisor/statistician provided me the following data to report in this paper. He said he completed a variance ...
1 vote
78 views

### How to calculate F-statistic from a svyglm model in R

I am struggling to figure out the correct way to calculate the F-statistic of a regression model that uses complex survey data in R. I am using svyglm from the R survey package. Would the below code ...
1 vote
33 views

### Calculating R-squared (coefficient of determination) from WLS linear regression with zero intercept

I need to calculate the R^2 for a weighted least squares (WLS) regression model which is also a regression through the origin (RTO). I'd like to use it for comparing the quality of the fits for the ...
1 vote
55 views

### Regression Model for a Ratio Outcome with Count Variables as Numerator and Denominator

I have a dataset where each row corresponds to a country and contains independent variables such as "per capita income" and "mean education status." Additionally, there are two ...
44 views

### Reasoning weighted regression via causal inference

I want to follow a similar approach to what was done in the paper of Bornkamp et al. in 2021 (DOI: 10.1002/pst.2104). More specifically they added a link to a R markdown file (https://oncoestimand....
55 views

### Weighting linear / logistic regression data points by explanatory variable sample size

[EDIT: had fundamental misunderstanding, rephrasing question - thanks to @whuber for catching that] I have some pretty simple regressions (linear & logistic) predicting a rate (continuous response ...
1 vote
185 views

### how to understand the weights in PSM？

When using propensity score matching or weighting, a column of weights is generated that is used to estimate the effect of interest. According to a blog I read, there are three types of weights ...
1 vote
43 views

### Feasible GLS estimator

I'm approaching for the first time GLS estimators. Suppose that $\operatorname{Var}(u|x)=\sigma^2 h(x)$, where $h(x)$ is some function of the explanatory variables that determines the ...
1 vote
41 views

### Logistic regression for hierarchical / nested (3 level) data

Research Problem We are trying to help universities recruit as many students as possible for different projects for a good cause. To be eligible for any project offered by their university, students ...
1 vote
125 views

### Calculating outcomes in IPTW

I have a few questions concerning what to do next after balancing your population with IPTW. This is a code just to have an example: ...
1 vote
35 views

### Calculating weights for a weighted least squares regression on a differenced time series

I am looking for guidance on whether I am approaching my problem correctly. I have an annual time series { $x_{1}$, $x_{2}$, ..., $x_{t-1}$, $x_{t}$ }, where each observation is the estimated median ...
25 views

### Using the Goldfeld–Quandt test for weighted models

I've got a set of variables $(x,y)$ and a corresponding linear regression model, for which I should perform the Goldfeld–Quandt test in order to check for heteroscedasticity. I performed the test and ...
81 views

### Include confidence intervals of samples in nlme model

I have a continuous response variable (leaf length), which has been repeatedly measured in 45 experimental plots over several growing seasons. My goal is to properly estimate at which day of the year (...
1 vote
100 views

### Design-based standard errors in svyglm but w/o weights or stratification

For inverse probability weighting (IPW) in R the use of survey::svyglm is well established. I want to compare the results of 10K+ (!) models with and without the ...
108 views

### Geographically weighted random forest and categorical covariate

I am about to use geographically weighted random forest (GWRF) for regression prediction (I want to predict a continuous raster). I have one dependent and 4 independent variables. One of my ...
59 views

### Implementing SUR on weighted regression models

I have two equations: fit1= svyglm(Y1 ~ X1 + X2 + X3, design= design.mnps, data= data) fit2= svyglm(Y2 ~ X1 + X2 + X3, design= design.mnps, data= data) ...
1 vote
93 views

### Heteroscedasticity robust variance-covariance matrix for weighted multivariate regression

I need heteroscedasticity robust standard errors for a multivariate linear model (MLM) with weights. In R we usually use sandwich::vcovHC with type ...
1 vote
23 views

### Times series with autocorrelated errors

I'm following the "Time Series Analysis and Its Applications With R Examples" from Shumway and Stoffer. In chapter 3.8 they talk about Regression with Autocorrelated Errors. "They use ...
96 views

### Interpretation of weights in a GLM

I want to know whether my interpretation of GLM weights is correct. On R documentation of GLM it says that Non-NULL weights can be used to indicate that different observations have different ...
1 vote
49 views

### Should I take logarithm of weights in WLS regressions

I am new here. I have a question regarding the anlaytical weights used in ivreghdfe or reghdfe regressions. People usually take aweights in STATA, my question is how we deal with the weight if the ...
81 views

### Difference-in-differences estimation using using Weighted Regression

I am trying to estimate a diff-in-diff model by demeaning data and consider unit weights. To better explain, I'll show my understandings so far. Questions in bold. Consider the classic diff-in-diff ...
261 views

### Timeseries - How are the window/span size and 'frac' in LOWESS related?

Many software implementations of locally weighted scatterplot smoothing (LOWESS), such as those in Python and R, require a frac parameter as an input. I am confused as to how frac is mathematically ...
1 vote
35 views

### Apply geographically weighted regression's model parameters to a finer spatial scale [closed]

I have three raster layers, two coarse resolution and one fine resolution. My goal is to extract GWR's coefficients (intercept and slope) and apply them to my fine resolution raster. I can do this ...
155 views

### Model specification for skewed proportion as dependent variable

I am struggling with assessing the best weighted regression type/model specification for my problem. The goal is to determine influence of independent variables towards the outcome (dependent variable)...
31 views

### Meaning of residual variance is the output of R's lm() for weighted least squares

What does sigma in the summary of R's lm function represent when it's called with weights? From the help file and source code it ...
1 vote
16 views

### What is the difference bewteen "features" and "covariates" in the recent Syntetic Control (SC) literature?

I am reading Cattaneo, Feng & Titiunik (2021)'s JASA paper, "Prediction Intervals for Synthetic Control Methods" (here ungated) and have encountered a development of SC that I don't ...
63 views

### Is Synthetic Control Method a nonparametric estimator?

I'm studying causal inference and I'm struggling to understand how to properly classify an estimator as nonparametric. My colleague argued that the Synthetic Control Method is an example of a ...
41 views

### Can I increase number of observations in a group to compensate an increased variability, and account for it in weights in a regression?

I don't really know the norm to justify the use of weights in regression, but I was wondering if I could use them to account for some confound variable that I know about. Basically I am asking ...
97 views

### Error while using the weights option in nlme in r

Hi i am trying to fit a power curve to model some observations in an nlme. However, I know some observations to be less reliable than others (reliability of each OBSID reflected in the WEIV in the ...
37 views

### Monte Carlo Simualtions for Weighted Least Squares

Is there a way to set Monte Carlo simulations to show that Weighted Least Squares regression are the best for a given Data Generation Process? I am looking for something similar to the common Monte ...
120 views

### How do I calculate weights for weighted means?

I want the weighted mean of my dv, velocity. In this scenario, velocity is a derived/interpolated measure comprised of repeated measures of randomly sampled speeds in a given region. There will always ...
250 views

### What's the meaning of an increased SMD after inverse propensity weight matching?

I made an inverse propensity weight matching for my research project (two groups, treated and control) and after I observed for some covariates an increased standardized mean difference. What is its ...
112 views

### Predicted y on IPW (Inverse Probability Weighted) logistic regression

I am performing a logistic regression where the original data has unbalanced classes, 5% 1s and 95% 0s. Using IPW (either by calculating the weights myself or by choosing class_weight='balanced' in ...
294 views

### Is there a way in R to include weights in a cox regression with Firth's penalized likelihood?

I am trying to fit a propensity score weighted cox regression model in R. However, one of the treatment groups has zero events, so I also need to use an adjustment method (Firth's penalized likelihood)...
176 views

### Comparing weights in SPSS regression and R lm

In SPSS, you can use a variable as WLS Weight when carrying regression. In R, you can use a variable as an argument weight in <...
1 vote
283 views

### What is the Matrix form of the prediction interval for Weighted Least Squares Regression

For ordinary least squares, I know the confidence interval is $\hat{Y} ± t\cdot\sqrt{\hat{\sigma}^2 * x_{new}(X^{\top}X)^{-1}x_{new}^{\top}}$ and $X$ is the design matrix, n is the number of ...
56 views

### Combining standard errors of two separate variables

I have a dependent variable associated with a SE and an independent variable associated with a SE. I would like to weight my regression such that both of these SEs are taken into account. What is the ...
26 views

### What does it mean when variables in in (probability) weighted regression are significant but variables in an unweighted regression are not?

I'm running to regressions. One with probability weights inputted and another one without. When running them, my results indicate that some unadjusted variables are insignificant, but those same ...
279 views

### Fitting a Prentice-weighted PH Cox regression to case-cohort data and predicting scores based on new data

I am trying to fit a proportional hazards regression model to case-cohort data (where cases are oversampled and not representative of the population). I am using the Survival package and cch() ...
1 vote
100 views

### Survival analysis of a stratified case-cohort study in R

I am trying to perform a survival analysis for a stratified case-cohort study (1:2) where cases are patients with distant recurrence (DR) and the cohort is composed by patients without distant ...
1 vote