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.

Filter by
Sorted by
Tagged with
2 votes
1 answer
48 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 ...
ryan_coogler's user avatar
0 votes
0 answers
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 ...
jimmybuckets's user avatar
0 votes
1 answer
22 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 ...
tatami's user avatar
  • 765
0 votes
0 answers
18 views

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

Lets say I have the following sample data. ...
quant's user avatar
  • 511
0 votes
0 answers
22 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 ...
Marike Cockeran's user avatar
2 votes
1 answer
21 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 ...
Stephen Clark's user avatar
0 votes
1 answer
26 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, ...
Luis's user avatar
  • 1
0 votes
0 answers
37 views

Lower bounding weighted sample variance

Let us assume that we draw a sample $\{X_i\}_{i=1}^N$ from a random variable $X$ and we have a discrete probability distribution $q_{ij}$, i.e. $0 \leq q_{ij}\leq 1$ and $\sum_{ij} q_{ij} =1$ (the $...
raskolnikov's user avatar
0 votes
0 answers
56 views

How to normalize data for weighted sum model

I'm building a simple weighted sum model for ranking. $$ \text{Store Rank} = w_1 \cdot param_1 + w_2 \cdot param_2 \ldots + w_n \cdot param_n $$ The problem here is that one of the parameters depends ...
Ivan's user avatar
  • 101
2 votes
0 answers
44 views

XGBoost Calibration for weighted loss function

I am currently using XGBoost (in R) to perform multiclass classification. I am using merror=eval_metric and my objective is <...
HeyCool08's user avatar
1 vote
1 answer
70 views

Inverse probability weighting led to a decreased R-squared value

I used inverse probability weighting to correct for selection bias in my sample. After including inverse probability weights in my model, I observed that the R2 actually decreased compared to the ...
zjppdozen's user avatar
  • 113
1 vote
0 answers
36 views

Estimating variance based on parameters

I have a list of measurements $y_1,\ y_2,\ ...,\ y_n$ of quantity $Y$ and a list of parameters associated with each measurement $(A,\ B,\ ...)_j,\ j=1...n$. The distribution of $Y$ is symmetric, but ...
beregdsk's user avatar
0 votes
0 answers
22 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 ...
Charly Marie's user avatar
0 votes
0 answers
17 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: ...
semyd's user avatar
  • 103
0 votes
0 answers
62 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 "...
J Louro's user avatar
0 votes
0 answers
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&...
ryan_coogler's user avatar
0 votes
0 answers
44 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: ...
dash2's user avatar
  • 235
0 votes
0 answers
57 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 ...
nrath's user avatar
  • 11
0 votes
0 answers
19 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 (...
alpagarou's user avatar
0 votes
0 answers
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 ...
jessicagranweiler's user avatar
1 vote
1 answer
10 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 ...
Jackson Dunn's user avatar
1 vote
1 answer
39 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 ...
Richard Martin's user avatar
0 votes
0 answers
29 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 ...
Sam_EPI's user avatar
1 vote
2 answers
56 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 ...
Desp C's user avatar
  • 13
0 votes
0 answers
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 ...
Desp C's user avatar
  • 13
0 votes
0 answers
99 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 ...
mirrror's user avatar
  • 41
4 votes
2 answers
249 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 ...
David Moore's user avatar
0 votes
0 answers
47 views

How to calculate confidence intervals in a subgroup of a weighted sample?

I have a weighted data sample (size : 20000) and I want to calculate a 95% confidence interval for the mean of a variable in the dataset, but only in a specific subgroup within this dataset (size of ...
mtr's user avatar
  • 1
0 votes
0 answers
38 views

A numerical example for combining post-stratification weights

I'm reading Using Weights in the Analysis of Survey Data by David R. Johnson . When we conduct a survey, people have different likelihood to respond. For example, suppose there are 50% males and 50% ...
robertspierre's user avatar
0 votes
1 answer
200 views

Discrepancy between standardized mean difference in cobalt and smd packages

Let's suppose I have weighted my population using WeightIt ...
user19745561's user avatar
2 votes
1 answer
54 views

Should matching (without discarding units) be attempted before weighting?

In ecology, we are often working with very small samples, i.e. I only have 13 sites of each of the two farming practices I am comparing. Thus, I really don't want to discard any of my sites and thus I ...
guest's user avatar
  • 21
0 votes
0 answers
35 views

How to calculate the optimal weights and bias in SVM (by hand)

I've been trying to solve the following exercise: -> Consider a dataset with two points in 1D: (x1 = 0, y1 = −1) and (x2 = √2, y2 = 1). Consider also the mapping to 3D φ(x) = [1, √2x, x2]. a) Find ...
Catarina Toscano's user avatar
0 votes
0 answers
28 views

Is the standard deviation affected by using calibration weights?

I'm sorry if the terminology is incorrect. I have tried to find some background information through standard google searches, but I've come up short. I work with data from a quesionnaire on health ...
Magnus's user avatar
  • 671
0 votes
0 answers
31 views

How to compare relative weight of two subsets?

For one experiment, I have two data sources A and B contributing data points, and a function that takes the union of the sets of datapoints and assigns a quality weight to each point. I'm trying to ...
John's user avatar
  • 101
0 votes
1 answer
34 views

R: Selection probabilities with panel users (complex survey data)

I am calculating the weights for a survey, but I don't know what to do with my selection probabilities. Let's say I want to ask people from some country what their opinion is about several subjects. I ...
Myrthe Kroes's user avatar
0 votes
2 answers
21 views

Weighed average (percentage) depending on the number of facilities in each given region

I have 10 regions with facilities (different number of facilities in each region) that test people for presence of condition A. However, there are also facilities, that were included in the pilot ...
Vlad Fedo's user avatar
2 votes
1 answer
63 views

Bang and Robins doubly-robust estimator biased and with large variance?

In their 2005 paper (also see the correction here) Bang and Robins describe a doubly robust estimator of the average treatment effect. In short, the procedure is: Estimate inverse probability of ...
Lachlan's user avatar
  • 1,162
1 vote
1 answer
258 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 ...
Plumber's user avatar
  • 33
1 vote
1 answer
30 views

Standard way to measure linear regression input variable "strength"?

Doing a work project where I created a simple multivariate linear regression model in python with sklearn. My model performs well, now I'd like to discuss some takeaways with my team, namely the "...
Ralph's user avatar
  • 155
1 vote
0 answers
19 views

Where does weight factors come into play with real data (in R)?

I do understand the IMHO simple concept using weights to fit a sample to another (real) population. Calculating the weight factors is not hard. Regarding to my MWE there maybe is a more elegant R way ...
buhtz's user avatar
  • 232
0 votes
1 answer
186 views

Calculate risk ratio in weighted population

I have a propensity score weighted population (using IPTW) and I want to compute risk ratios on my weighted population. For this, I am using a weighted Poisson regression. Let's suppose that "...
user19745561's user avatar
0 votes
0 answers
36 views

How do coefficients change in a weighted least squares regression?

We regress $Y$ on categorical data $X_i,\ i=1,\ldots,\ p$. Suppose this is a large dataset and many of the rows of the design matrix are duplicated. We minimize the dataset as follows: We average $Y$ ...
Gop's user avatar
  • 1
2 votes
1 answer
283 views

Recognize extreme weights in inverse probability treatment weighting

I have some doubts about how to recognize if there are extreme weights after balancing my population with inverse probability treatment weighting. For instance, let's look at these results [code at ...
user19745561's user avatar
1 vote
0 answers
31 views

Density weighted Law of Large Numbers argument for the convergence of an expectation approximation

Given a set of IID samples $X = \{x_i\}_{i=1}^n$ assumed to be from the density $p(\cdot)$, and the function $h:\mathbb{R} \xrightarrow{}\mathbb{R}$, its expectation can be approximated as $$\mathbb{E}...
1809's user avatar
  • 11
2 votes
1 answer
359 views

Create table before and after IPTW with frequencies in R

I am doing propensity score weighting with the package "Weightit" and I want to have a Table 1 "Before and After Weighting" like this one: As you can see, data are displayed ...
user19745561's user avatar
1 vote
0 answers
32 views

What is the mode of inference for frequentist IPTW estimation in the causal inference context

In Rubin 1990, Donald Rubin describes four different modes of statistical inference for causal effects: Randomization-based tests of sharp-null hypotheses - in the tradition of Fisher, if you've got ...
nrath's user avatar
  • 11
2 votes
0 answers
40 views

Propensity-Score Matching - what's the best choice when matching?

I'm using matchit package to create a propensity match. I'm trying to match control and treated with a 2:1 ratio in order to maximize the population and exclude ...
Mio zio Tuo zio's user avatar
1 vote
0 answers
26 views

OLS assumptions for weighted errors

As far as I know, under satisfied assumptions for OLS, the estimates acquire qualities like BLUE, MVUE, MLE. But in the case where there is a priori knowledge of the influence of each data point, it ...
Paw -'-el-'- Cow's user avatar
4 votes
2 answers
114 views

Using sample sizes when combining z-scores

What is the theoretical justification for using the square root of the sample size as the weight when combining z-scores in a meta-analysis? Is this because the variance of the z-score is proportional ...
John Smith's user avatar
0 votes
0 answers
22 views

Random Forest--prioritizing response variables

Is there a way to prioritize response variables in a random forest model, ideally in R? For example, suppose I want to predict tree height based on elevation, aspect, slope, and tree canopy cover. In ...
Brebenel's user avatar
  • 101

1
2 3 4 5
9