Questions tagged [weights]

"Weights" may refer to: (1) observation weights that come from sample surveys -- consider tagging "survey-sampling"; (2) Monte Carlo sample weights that arise when sampling from intractable distributions -- consider tagging "weighted-sampling"; (3) variable weights in statistical or machine learning models such as regression, factor analysis, or learning networks -- consider tagging with that specific model. Other odd uses of weights go here.

426 questions
Filter by
Sorted by
Tagged with
289 views

Sandwich variance estimator or bootstrap-based variance for stabilized inverse probability weighting (IPW)

Multiple published papers describe IPW as akin to having population with multiply copies of the same individuals. Hence, the correlation should be accounted and corrected using sandwich variance ...
• 885
1 vote
25 views

Subjective confidence as weights in regression models

I have data where subjects rate a quantity on a certain scale ($y$) but also add their subjective confidence as to how sure they are in their choice ($w$). My initial thought was to add $w$ as weights ...
• 3,520
20 views

Calculate model with two sets of survey weights for the same population

I am working with a double set of survey weights for the same population X. The survey is probabilistic, stratified, multi-staged. Respondents have to answer two sets of questions: questionnaire A and ...
56 views

Perform a weighted linear regression on $x_i, y_i$ by doing a standard linear regression on $X_i, Y_i$?

Let's say we want to do a weighted linear regression between two series $(x_i)$ and $(y_i)$, with weights $(w_i)$, and get the coefficients from the line $y = mx + p$, and the $r^2$ coefficient. Is ...
• 632
13 views

Is it possible to calculate inter-rater reliability for one item rated by multiple raters with weights?

I have a survey with a number of statements that had participants categorizing the statements into one of the 4 options they were provided. The participants were then asked to rate the confidence of ...
1 vote
25 views

Currently I am working with PCA techniques (specifically sparse PCA techniques) but my question revolves around obtaining the weight matrix in PCA. This reference provides the following representation ...
• 11
19 views

Intuition behind Welch's ANOVA

I run some simulations and naturally Welch's ANOVA for unequal variances is pretty good compared to classic ANOVA and it seems it has no downsides. However, I still lack understanding as to why it ...
• 213
191 views

Why are 1/SE or 1/variance commonly used as weights in regressions?

I'm trying to do a meta-analysis for the first time, comparing measurements of a simple experiment treatment against a control in a variety of species. I started by fitting a mixed-effects model to ...
• 18.9k
73 views

What is the R Equivalent of this Stata Survey Weighting Code?

I am working with the SIPP data set and they use replicate weights. They offer advice here for what code you should use in Stata or SAS for applying their replicate weights correctly. Specifically ...
• 117
17 views

What is the weights argument in glm.fit?

I just literally don't understand what the weights argument is in glm.fit. Could you give me a really simple example so that I know how to interpret it and know how it works? If you think it's really ...
• 33
23 views

Weighing Data Issue

I am looking at e-cig prevalence within a city. I used surveys to collect data from residents, and I have a query around weighing data. I have made the assumption, due to over and underrepresentation ...
27 views

Marginal structural model using PROC PHREG

I would like to fit a marginal structural model to account for treatment switching during follow-up. I found a great paper on how to do this in R: https://www.sciencedirect.com/science/article/abs/pii/...
• 615
93 views

What are the main pros and cons of the most commonly used weighting methods?

There are many methods to generate balancing weights in observational studies (see, for example, the many methods implemented in the amazing WeighIt package). I have seen some great discussions about ...
1 vote
64 views

Apply a method for competing risks with the propensity score IPTW weights

I have a data in which I have to apply a competing risk. 4 variables: Temps_Competing_Descompensacio: the time to event. Competing_Descompensacio: factor variable to identifie the event, censored, ...
14 views

Standardizing variables from complex surveys

I have several continuous variables from a survey that I want to analyze. I will use survey weights for regression. But I want to standardize those variables first. Should I use the weighted means ...
9 views

Weighing by missing observations

I have data where each row represents an observation and each column represents a variable. Variables are binary and has missing values. I want to calculate a sum of the presence of these variables. I ...
43 views

How should I visualise uncertainty in a histogram from survey sampling?

I have a numeric variable $\{x_i\}$, which corresponding weights $\{w_i\}$, where the weights are survey weights from a corresponding complex survey design. I want to visualise a weighted histogram of ...
• 2,551
10 views

Mean of probability weights adjusting for informative censoring

A reviewer of a paper is giving me a hard time about presenting figures which show that my time-varying probability weights have a mean of 1 across observed timepoints. My weights (unstabilized) ...
• 31
54 views

Use of weights in non-linear least square fitting

I would like to have your suggestions and help concerning my problem. I have images generated on a position sensitive detector. The signal for each pixels corresponds to the amount of 'particles' ...
• 21
27 views

Heteroscedasticity

I am trying to build a regression model to explain variations in mortgage volumes using variations in different mortgage rates. To account for the drastic change in macroeconomic environment: from ...
1 vote
130 views

Weights in binary logistic regression

I am conducting a vote-counting meta-analysis where the only information I have from each study is the direction of the treatment effect (positive or negative) and the sample size. My plan is to fit a ...
14 views

Spatial autocorrelation weight matrix for heatmaps

I am not an advanced mathematician and I'm very new to spatial autocorrelation. So I apologize if my question seems primitive in any way. I'm looking for ways to quantify the distribution similarity ...
158 views

Weighted independent t-test

Do you think the following approach is valid in terms of computing independent t-tests that account for statistical weights? Essentially, we want to compare whether a random sample of people from 31 ...
6 views

Determine weights for a risk weighted calculation for road safety

I'm looking to quantify route safety for each route in our route database. For this, I have the following data in the past 2 years: accidents observed for each route, no. of phone usage events no. of ...
1 vote
77 views

Do we need to generate new IPW when doing subgroup analysis?

I am working on a quasi-experimental study to compare an interventional and control arm. I have generated inverse-probability weights (IPW) and weighted the population (N=300) when estimating effect ...
• 885
38 views

How to calculate weighted mean when your sample is unweighted, but you know your population

Lets say I have the following sample data. ...
• 521
39 views

MCA weights to construct a score

I have a set of variables all measured on a nominal scale. I have applied the MCA function within the FactoMineR package to reduce the dimension of my data set. Next I would like to calculate a score ...
28 views

R joincount with non-integer counts

I am using the R function joincount.multi from spdep to look for spatial autocorrelation with my data. The joincount column is ...
157 views

RNN weight and state matrices

Implementations of RNN in NLP tasks, like those in https://dennybritz.com/posts/wildml/recurrent-neural-networks-tutorial-part-2/, are done using matrices, that are used to store the inputs, outputs, ...
• 1
57 views

• 11
54 views

Should we use survey::svyglm() to compute correct standard errors with WeightThem?

I need to use multiply imputed datasets and weights before using linear models (linear, logistic and negative binomial). I have 2 sources of informations that point to different directions to compute ...
24 views

How to linearly weight components of a multiplication?

I have a composite score that is made up of the multiplication of many components. I would like to weight each component individually. example: ...
• 123
97 views

Survival analysis using as exposure a case-control study variable

I have doubts about how to correctly analyze the following study, since it is neither a nested case control nor a case-cohort study, but it is a previous matched case-control study in which the "...
12 views

Longitudinal sample with varying levels of non-response

I'm using answers to a specific question from the General Social Survey ("do you feel rushed"?) to compare statistics over multiple years. The answers are "Always" "Sometimes&...
127 views

How can I reweight survey data

I have survey data from a complex survey with stratification, weights and clustering. I'm using the survey package in R to run regressions: ...
• 246
1 vote
108 views

When using IPW methods for causal inference, why does the robust variance lead to conservative standard errors?

I'm trying to understand a claim that I've seen stated in a few different papers that when using IPW methods as the estimator for a causal estimand, the robust standard errors from the outcome model ...
• 21
25 views

Use of weights in a binomial model, with the response no longer a proportion

I am studying the factors that influence mosquito feeding behavior. In the experiments, N mosquitoes are exposed to a host for a duration t. At the end of this exposure, we count how many mosquitoes (...
4 views

What is the conditions to use a weights argument to a linear model, when the dependent variable is a proportion?

My data consists of the independent variable (x) which is slope gradient (°) and the dependent variable (y) is collar GPS point density/km². For each slope gradient, the independent variable was ...
1 vote
11 views

How can we use average total time if a job to determine time of components?

Imagine a scenario where there are tasks (called jobs) made of many smaller tasks (called assemblies). Each assembly has an average time to completion, and the job time to completion is a sum of the ...
• 113
1 vote
45 views

Shouldn't estimates from grouped data using weights be the same as the estimates from micro data

I was under the impression that weighted regression on grouped data, where the weights are equal to the number of group members, should result in the same estimates as running the regression on the ...
50 views

How to bootstrap confidence interval for a weighted KM survival probability in R?

I'm a grad student trying to calculate the survival probability at a particular time point (in this case at 12 months). In order to deal with differential loss to follow-up (LTFU), I'm assigning ...
1 vote
101 views

How to generate random weights that sum to unity using R? [duplicate]

I am trying to generate random numbers (weights) using Monte Carlo simulation using R. I would like to have 10000 simulation replications, generating weights for 13 variables. I am trying the ...
• 13
7 views

Assign weights to develop a modified index, in case that the index is a quotient such as A/(B-C)?

I am trying to modify a water use monitoring index which has a form such as A/(B-C), taking into account the importance of each one of the variable (A, B, C). To identify the importance weights, I ...
• 13
219 views

What is the correct approach to creating spatial weight matrices for a spatial lag/error model when some observations are very far from any others?

I am running a spatial regression model in R, but I am having trouble figuring out how to define a spatial weights matrix. There are two packages I can use, the package spdep has the function ...
• 43
262 views

Combining velocity measurements which are accurate in different ranges

I am using two different methods to measure velocities, which can be positive, negative or zero. Method A accurately measures low velocities and no velocity, but not highly positive or highly negative ...
• 247