The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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].

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

Determining weights for fitting non-uniformly spaced measured data (v2)

Let's pretend I have some data to which I want to fit a line. If the data are uniformly spaced along the x-axis, I get the following: If the data are not uniformly spaced, I get a different fit line:...
0
votes
0answers
19 views

Determining weights for fitting non-uniformly spaced measured data

I have a system of generally known behavior, and some non-uniform measurements of that behavior (let's say without measurement error). Now I want to fit a simple function to a subset of the ...
0
votes
0answers
8 views

Selection of sample_weight for gradient boosted regression

I'm looking for any information on how the sample_weight parameter is typically selected for gradient boosted regression tree's - i.e. implementations such as ...
1
vote
1answer
27 views

Convergence of weighted regression solution to the solution of L1 regression

I have read in this paper that the weighted regression solution converges to the solution of L1 regression, for weights, $$W_i=1/|y_i-\hat y_i|$$ I worked this out but unfortunately, I lost. Could ...
1
vote
1answer
46 views

Confidence interval for mean of m predictions

I have a gradient boosted regression tree model (catboost). $y = F(X) + \varepsilon$ I need to compute the following - specifically the 2nd equation below, the first is trivial. $\frac{1}{m}\sum \...
0
votes
1answer
32 views

Poisson regression with offset vs poisson regression with weight [duplicate]

I would like to know the linear expression of weight and offset in terms of poisson regression in glm. for instance for offset ...
0
votes
0answers
23 views

Question regarding linear regression weighting matrix

Consider the linear regression model $$b = Xy + e, \quad E[e] = 0, \quad E[ee'] = V$$ Assume that the matrix $X$ has linearly independent columns. It is well known that the minimum variance affine ...
0
votes
1answer
16 views

How do I use weighted least squares in a matrix formulation of a multiple regression analysis?

If the coefficients of OLS multiple regression can be determined by: β = (X'X)^−1 * X'Y, then what formula/matrices would be used for WLS?
1
vote
0answers
42 views

Formulas for multivariate meta-regression

everyone! I'm digging in meta-regression and doing hand calculations using WLS to get better understanding of the topic. I'm fine with calculations for univariative model (that is, 1 covariate is ...
0
votes
0answers
10 views

analytic weights when the outcome is a standard deviation

I have a research question evaluating the longitudinal divergence of a profit index across businesses within a market. The index is continuous. I plan to use a market-level random-effects model where ...
1
vote
1answer
51 views

Weighting in Likert Scale results

I have referred to similar questions on this topic, but the problem presented then was not quite in line with my research, so I have created a new question. My research is the following: I have ...
0
votes
0answers
17 views

Does local linear regression include a weighting Kernel?

3 minutes ago 1 Hey, I am applying a Regression Discontinuity Design (RDD) to estimate the effect of a policy change. In RDD I can apply the parametric approach (polynomial regression) and the non-...
1
vote
0answers
26 views

How to perform regression with different error variances? [duplicate]

I have two series of measurements values, first series is X and second is Y. I need to model Y as a function of X, where I know the method that was used to measure X is two times better then the ...
2
votes
0answers
29 views

How to decide what variables to weight in a WLS regression

My question concerns the weighting procedure used when using weighted least squares and multiple variables. I'll start by explaining my own limited understanding of how to conduct a weighted ...
0
votes
0answers
36 views

How can analytical weights be used together with sampling weights?

I run a linear probability model (LPM) on survey data, which contains sampling weights. Say the predicted probabilities from the OLS regression are $\hat p_i$. Heteroskedasticity would make me ...
0
votes
1answer
41 views

Out-of-sample predictions with prediction intervals using WLS in statsmodels library

I am using WLS in statsmodels to perform weighted least squares. The weights parameter is ...
0
votes
0answers
18 views

How to calculate weights for a weighted ordinal regression, with > 2 possible outcomes (unbalanced)?

I'm trying to perform an ordered logistic regression with the response variable being a certain 'level' of achievement (level 1 = highest level, level 2 is one below, until level 10 - the lowest level)...
0
votes
1answer
48 views

Weighted least squares versus ordinary

Is it ever better to use ordinary least squares (OLS) over weighted least squares (WLS)? If a model is fit well by OLS, will I get worse results if I use WLS instead? Obviously, OLS is faster, but ...
0
votes
0answers
10 views

Appropriate weighting factor in weighted least squares regression

I'd like to construct a regression model with expenditure on a certain public service (a continuous variable in £s) as the predictor, and productivity (represented as a continuous variable on an index)...
0
votes
0answers
58 views

Restricted Weighted Linear Regression in R

I have to follwing issue. I would like to run a linear regression imposing a constraint on the weighted coefficients. Let me construct an example: Consider the following cross-sectional regression $...
0
votes
0answers
101 views

Why do stabilized IPW weights give the same estimates and SEs as unstabilized weights?

In Cole & Hernán (2008), the authors mention that using stabilized weights can decrease the variance of the effect estimate. Regular inverse probability weights use the probability of being in the ...
2
votes
0answers
36 views

Different error weighting for positive and negative residuals for OLS?

For OLS-estimators in multivariate regression analysis, it logically doesn't matter whether an error is positive or negative. I was wondering if in some situations it might make sense to weight a ...
2
votes
0answers
33 views

Problem from Introductory Wooldridge regarding WLS

I was reading the book introductory econometrics by "Wooldridge", and in Chapter 8 (Heteroscedasticity), it is stated that (see pink part) I could not understand, if $u$ and $x$ are uncorrelated, ...
0
votes
0answers
11 views

Calculate mean by decile in Svydesign object

So, I´m working with ENIGH - Database, which stands for ¨National Survey of Household Income and Expenses¨ in Spanish, this is an exercise conducted by the Mexican government and like most surveys of ...
4
votes
2answers
111 views

Are GLMs just glorified WLS regressions?

When performing weighted least squares $L = \frac{1}{2} \sum_i w_i r_i^2$, Aitken showed that one ought to weight each sample by the inverse of its variance $w_i=1/\sigma_i^2$. This leads to gradients ...
0
votes
0answers
15 views

Probability Weights and Dropping Observations

I am trying to determine how applied empirical analyses adjust probability weights after dropping observations. For example, say I have a strict subset of the population that takes a 2013 cross ...
0
votes
0answers
46 views

Posterior distribution of ATE with Bayesian propensity score model?

I am using propensity score weighting (PSW) to estimate the average treatment effect (ATE) of some treatment $D$ on an outcome $Y$ with covariates $X$. I have seen several ways in the literature (both ...
1
vote
0answers
48 views

Why weighted glm coefficients differ from weighted mean?

Let's consider the following dataframe: ...
0
votes
0answers
36 views

When to use variance stabilizing method?

Let's suppose we want to estimate $p$ from $m$ independant realisations of $X\sim Bin(n,p)$: $x_1,x_2,\dots,x_m$, with respective size $n_i$ $i$ in $\{1,\dots,m\}$. Let $p_i$ be $p_i:=x_i/n_i$. To ...
3
votes
1answer
118 views

How to fit a weighted mixed effects model?

I am looking to get help into specifying the structure of the variance matrix within the gls() function in R's nlme package (or recommendations of other packages ...
1
vote
1answer
103 views

Inverse probability weighting (IPW) with positive and negative treatments?

I am studying the effects of the government intervention which can take two directions and is usually represented as follows: $Treat = \left\{\begin{matrix} & +1 (intervene), if state A\\ &...
8
votes
3answers
277 views

Using regression weights when $Y$ might be measured with bias

Suppose we observe data $Y, X$ and would like to fit a regression model for $\mathbf{E}[Y \,|\, X]$. Unfortunately, $Y$ is sometimes measured with a systematic bias (i.e. errors whose mean is nonzero)....
2
votes
1answer
101 views

Using White's Robust Co-variance Matrix vs Weighted Least Squares to correct for heteroscedasticity

I've been trying to figure this out for a bit. How does using White's robust co-variance matrix in OLS vs weighted least squares affect mean response confidence intervals? I've experimented with ...
1
vote
1answer
38 views

What's the formula to estimate the shape parameter of Pareto distribution using weighted least squares method?

I'm trying to simulate my own method using R to estimate the shape parameter of Pareto distributed data by weighted least squares. I searched via several links of research papers, but I could not find ...
1
vote
0answers
160 views

Which is the right way to handle imbalanced data in a regression problem?

I'm working on a regression problem with imbalanced data, and I would like to know if I'm weighting the errors correctly. I'll try to illustrate the concept with a simple example. Imagine I'm ...
0
votes
0answers
19 views

How to find proper weights for summation of 3 dependent variables

I have time series for 3 variables, say energies from 3 sources (e1, e2, e3). I have checked their dependency using the calculation of the correlation of each pair and found that their dependency is ...
0
votes
1answer
156 views

weighted IV estimation by plm

I apply plm package to do fixed effects IV regression but find something which I couldn't understand. Theoretically, if we only have one endogenous variable and one IV, the IV estimator should be ...
0
votes
0answers
36 views

Risk classification with non uniform risk exposure (truncated observation period)?

I have N individuals who are exposed to a risk. The risk exposure is in year fractions (from 1/365 to 1). More or less 1/4 of the observations are exposed to the risk for an entire year. I want to ...
0
votes
0answers
12 views

Penalized regressions with forecast package and ets in R

Is there a way within the forecast package and ets to remap or penalize residuals based on some user defined function? E.g. If one wanted to impose a skew in error minimization, is this possible? ...
0
votes
0answers
51 views

Principal Component Analysis with weights

In a Principal Component setting, I want to solve the minimization problem $$\min_{\{f_t\}^T_{t=1}, \Gamma} SSR$$ where $$ SSR = \sum^T_{t=1}(y_t - \Gamma f_t)' R'_t R_t (y_t - \Gamma f_t)$$ $...
1
vote
0answers
64 views

Weighted Regression where Weights are associated with Response Variable

I am trying to carry out a simple linear regression analysis represented by the standard formulation: $$ y_i = \beta_0 + \beta_1x_i +\epsilon_i $$ However, there is an issue with my data. There is no ...
1
vote
1answer
147 views

How to use White-test to check if the heteroscedasticity has been effectively dealt with by a WLS?

Consider an OLS model with $n$ observations and $p$ explanatory variables (including an intercept term) $$y=X\beta + \epsilon$$ We may use a White test to (approximately) check for the presence of ...
1
vote
0answers
40 views

How to use weighted data in linear modeling?

I have data from studies where each study has the means for that sub sample and the sample size is n, so the n is a frequency. There is one categorical predictor. The dependent variable is a % (the % ...
1
vote
0answers
22 views

I am looking for an explanation of inference of results from weighted regression for a ratio of two continous variables.

I am performing a weighted regression for a ratio $R = \frac{Y}{X}$ using $X$ as weights. Y and X are normal and they are not independent. Is it valid to use $X$ as weights? What is the interpretation ...
2
votes
2answers
276 views

Weighted linear regression from log-likelihood?

I have 500 time-series and for each one, I compute the best (aka max likelihood) parameter α in a model that I'm testing, along with the corresponding log-likelihood. Now I wish to uncover a linear ...
0
votes
0answers
25 views

Switching attention - is there a statistical tool to mimic perceptive response?

I was driving this morning to work. Another car made sudden lane change. I noticed an interesting thing: for a brief moment my attention focused in this car. It almost physically felt that everything ...
2
votes
0answers
146 views

How to do a regression with a percent as the dependent variable and with sample mean values?

I have 60 sample of data from various studies. All I get is a mean for x and y, and a sample size. Furthermore y is a percentage. Sometimes we get the standard error of the mean. IIRC, percentages ...
1
vote
1answer
261 views

How to fit a line to data using weighted least squares (WLS) regression?

I am newbie to WLS regression topic. I am being asked to fit a line to a data using WLS. I am working in minitab. My data is as follows: cost (independent variable) (x-axis); production (dependent ...
2
votes
0answers
57 views

Standard error implications when combining IPTW and difference-in-differences

My question is about combining Inverse Probability of Treatment Weighting (IPTW) with a difference-in-difference regression with two periods (pre and post treatment). Basically, I first computed the ...
0
votes
0answers
41 views

Fitting model with error on independent variable

This is the second part of a question started here. However, as this touches a different problem inside the same overall issue I decided do separate it into two questions. I've made a series of ...