Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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

2
votes
0answers
28 views

Show positive semi-definiteness of co-variance differences

I am having difficulty checking if $$ (A'D^{-1}A)(A'D^{-1}BD^{-1}A)^{-1}(A'D^{-1}A) - (A'A)(A'BA)^{-1}(A'A) \succeq 0 $$ where $B\succ 0$ is a square co-variance matrix and $D$ is a diagonal matrix ...
1
vote
0answers
29 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
18 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
0answers
19 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
29 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
9 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
33 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
42 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 ...
0
votes
1answer
43 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
28 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
20 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
116 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
17 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
99 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
123 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
43 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
34 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 ...
1
vote
0answers
36 views

Goodness of fit for weighted regression

Is there a goodness of fit metric similar to R^2 that can be used to evaluate a weighted regression? In my particular case, my data points are cities and I weight a regression of this data by city ...
2
votes
2answers
99 views

Which weighting to use for regression analyses at different levels of aggregation

I run a study with subjects in 400 groups of heterogeneous sizes ranging from 2 to 20 individuals. I have outcome data at the group level and at the individual level. Treatment was randomly assigned ...
1
vote
0answers
18 views

Formulating the Netwon Raphson

If this is the dataset under consideration and ...
0
votes
0answers
80 views

Does assigning “prior weights” in a binomial GLM have the same effect as maximizing a weighted likelihood?

I am doing logistic regression where there is some uncertainty about the labels for some of the points. For example, I might only be 90% sure that person 1 is actually a "Yes"--meaning I'm 10% sure ...
0
votes
1answer
23 views

Weight of variables in Regression

let's say I have a model with variables Y, X1, X2, X3 and X4. How can I tell how much each variables account for? For example, the model is Y = Bx + Bx2 + Bx3..... Now if I wanted to look at it this ...
1
vote
0answers
91 views

Meta-analysis with binary variable and weighting with sample size - Is it possible?

I am trying to conduct a meta-analysis with my data on private equity performance versus the public stock market. The binary outcome is if private equity outperforms the public stock market (Yes = 1, ...
1
vote
0answers
25 views

Misspecified regression & asymptotics

Consider the weighted regression coefficient $\hat{\beta} = (X'WX)^{-1}X'WY$ where the regression is possibly misspecified and $W$ is known. Let $\beta_* = (E[X'WX])^{-1}E[X'WY]$ and the related ...
1
vote
0answers
33 views

Can analytic weights be converted into sampling weights?

I am running a linear probability model, so I know I need to correct for heteroskedasticity. Since I know the variance of the error (from theory) to be $y(\pmb x)(1-y(\pmb x))$ where $y$ is the ...
0
votes
0answers
32 views

Controlling for difficulty by weighting

I want to conduct a mixed model Anova. Essentially participants had to count the right amount of zeros from tables containing randomly generated tables of zeros and ones. Performance was measured by ...
1
vote
0answers
24 views

Correlation with adjustment

I have data from several animals that are tested daily for 15 days on the presence of seizures. I have the latency of the seizures(when it begins after the start of experiment) and they occur on some ...
1
vote
0answers
54 views

Normality and weighting scores by difficulty

I want to conduct a 2 x 3 x 2 mixed model ANOVA with Group (malus/bonus contract) as a between-subjects factor, time pressure (nine, 12 and 15 seconds) as a within-subjects factor and loss aversion (...
1
vote
0answers
24 views

Noisy Observation of Matrix of Certain Rank

Consider a rank k matrix, call it M, of size nxm. All the elements are non-negative. Now do a noisy observation of it and assume independent Poissonian errors (the error on element $M_{ij}$ is ...
1
vote
0answers
186 views

Closest approximation of a Poisson GLM using weighted least squares analysis to take into account mean/variance relationship

I have an application where I would like to approximate a Poisson GLM with identity link, i.e. a glm of the form ...
0
votes
1answer
34 views

What is the most efficient way to compute the weighted least squares estimator?

If we have the estimator $(X^{T}WX)^{-1}X^{T}Wy$ where the diagonal of W contains the inverted weights, what is the fastest/most efficient way to solve it? I know with OLS, the estimator is typically ...
1
vote
0answers
40 views

FGLS vs M estimator

I have been reading a lot that in Robust Regression, there are 2 ways of handling heteroskedasticity. 1)WLS - In SAS PROC ROBUST procedure, M estimator and Iteratively Reweighted Least Square. 2) FGLS ...
0
votes
0answers
96 views

Weighted least squares: how do I find weights

I have a dataset of the cars and their corresponding speed and distance and the R output. I am asked to find weights for the first 2 cars. First I find the residual for each car: $e_i=Y_i-\hat{Y}_i$ ...
0
votes
0answers
20 views

Finding weights and y-values in multiple linear regression?

Suppose I have observations from 15 hospitals that show its expenses, number of services offered, number of employees and the reciprocal of its average rank. I want to use these 4 independent ...
0
votes
0answers
80 views

Using sampling weights in precision, recall, etc

Suppose I take a very non-uniform sample $(x_1,y_1) ..., (x_n, y_n)$ from some population and derive sampling weights $w_1, ..., w_n$ for each sample. Next, suppose I do a logistic regression to ...
0
votes
0answers
92 views

Question concerning the weighted least squares

If the weighted least squares estimators are equal to the ordinary (unweighted) least squares estimators when when the errors have common variance $σ^2$ would it mean that the model given by the ...
1
vote
2answers
73 views

Weighted Least Squares with Endogenous Weights

Suppose I estimate the model $$y_i=\beta_0+\beta_1 x_i +\epsilon_i$$ via weighted least squares where $x_i$ and $\epsilon_i$ are independent, but I use weights $w_i$ that may be correlated with both ...
0
votes
0answers
100 views

Maximum likelihood estimation of the weights for a weighted general linear model

I am trying to re-estimate a developed and reduced general linear model in R in a weighted way (by using gls() for instance). The model contains a few continuous coefficients and blocking effect ...
0
votes
0answers
13 views

How can I reduce the impact of frequently occurring samples in regression?

A situation I frequently encounter is that I have multiple time series of observations which I'd like to analyze using a linear regression model. The time series contain many very similar observations ...
1
vote
1answer
580 views

Difference in R-squared observed from statsmodels when WLS is used

Recently I have been trying to solve one of my problems with OLS and WLS respectively, and was trying to determine whether a weighted regression would be more suitable by comparing the R^2 value. I ...
0
votes
0answers
108 views

Using latent variable as independent variable in regression

I ran latent class analysis using poLCA package and each observation in my dataset has been assigned a class based on the highest posterior probability (modal ...
0
votes
0answers
39 views

A sensible distribution of weights for regression bootstrapping

I need to bootstrap a great number of linear regression models. I have noticed, that sklearn.linear_model.LinearRegression supports sample weights. I conclude that ...
0
votes
0answers
11 views

Ponderate single results

Let's say I want to predict with my Python model who is going to win a football match, and I want to take into account into my model, all the games played by the two teams in the last year. How can I ...
1
vote
0answers
148 views

Regression - extremely skewed response with a large, sparse matrix of boolean predictors

I'm working with a dataset that contains: $y$: the response variable that is 98% zero, but in the remaining 2% of cases it has extremely skewed real values (not integers), ranging from sub 1 to over ...
2
votes
1answer
111 views

Combine Difference-in-Differences Design with Entropy Matching

I have a pre-post/treatment-control design (diff-in-diff) with one treatment event. The data is a firm panel data set (5 pre and 5 post firm-years, ~200 firms). The problem - my treatment and control ...
1
vote
1answer
64 views

Is data-likelihood-weighted regression a thing?

Consider the basic linear regression model $y = A \theta$ with $y\in R^n$ and $A \in R^{n\times k}$ measurements and $\theta \in R^k$ parameters to be estimated. In my case, $\theta$ are physically ...
2
votes
0answers
37 views

Spatial Regression of uniformly sampled KDE

I'm trying to formulate a spatial regression, and could do with some guidance. For my independent variable, I have multiple discrete observations, each with a latitude, a longitude, and a category. ...
1
vote
0answers
300 views

Calculation of standard errors in weighted least squares (WLS)?

I'm searching for the correct calculation for a confidence interval using weighted least squares regression. Let me introduce you to my problem. Guess we have thirteen ordinal classes 1 to 13. For ...
0
votes
0answers
53 views

which residual vs fitted plot is looking better here?

This is a data analysis project we have at school where we try different ways to correct a simple linear regression model. My first attempt is just trying to transform the response variable by taking ...
1
vote
0answers
71 views

Propagation of Absolute Error in Weighted Linear Regression

This is probably relatively trivial, but I am having a difficult time searching for what I want. I have a set of measurements with a well-defined variance, and I'm performing a weighted least squares ...