Questions tagged [sample-weighting]

The tag has no usage guidance.

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

How can I decrease the size of a particular group of an independent nominal variable within a sample without compromising the integrity of the sample?

Our team conducted an online survey to discover citizens' attitude on a particular topic. The total number of responses collected is 900. It's apparent that this is a non-probability sample of ...
Aneta's user avatar
  • 1
1 vote
1 answer
31 views

Are there coventions on reporting weighted sample sizes?

Suppose I analyze survey data and calculate weighted means. Should I report the sample size if it differs from the unweighted sample size, as would be the case with non-normalized weights? It seems ...
mb1994's user avatar
  • 11
1 vote
0 answers
41 views

Multilevel Regression and Poststratification (MRP) weighting in the opposite direction to Poststratification alone

We are using MRP to derive test norms for an IQ test (Culture Fair Test, CFT) based on the TwinLife data. We adjust for age, sex, education, and migration background. Although a probability sample, ...
balout's user avatar
  • 11
0 votes
0 answers
24 views

Complex survey design with multiple waves

The organization I work for has collected data from individuals in multiple waves. Their goal was to collect 333 individuals in 6 different groups (genderXgroup). If the first Wave did not reach 333 ...
StatsAreHard's user avatar
0 votes
0 answers
18 views

What is the correct way to incorporate sampling weights into a spatial regression?

I want to know what the proper procedure is for incorporating sampling weights into a regression. I am running a spatial regression using survey data in R. I'm using the function ...
mirrror's user avatar
  • 43
1 vote
0 answers
10 views

Suggested methods for generalizing survey results from one population to another, with individual level data for both

I have two datasets. The first dataset includes my variables of interest, as well as a large set of respondent characteristics. My second dataset includes matching respondent characteristics for a set ...
EvKohl's user avatar
  • 1,190
0 votes
0 answers
76 views

When do numerical transforms need sample-weighting before applying linear regression

Just wondering if anyone knows of any good resources for sample-weighting in numerical transformations. That is with the intent of using the transformed data in a linear regression model I work with ...
Arran Duff's user avatar
0 votes
1 answer
801 views

How do scale_pos_weight and sample_weight interact in XGBoost?

Question: How do scale_pos_weight and sample_weight interact in XGBoost when used at the same time during training? Are they multiplied, added or something else? Example when added: Example when ...
Glue's user avatar
  • 463
0 votes
0 answers
23 views

Multiple weights in survey dataset

This is for a simple survey dataset- the client has sample goals on two levels- one for group A vs group B. Another for group X vs group Y. So we have 4 weights affixed to each of these groups. The ...
Lakshmi Priya's user avatar
0 votes
1 answer
229 views

How to perform log-rank test correctly on IPTW weighted groups?

Thank you very much for your attetion! I am working on an observation study with time-to-event data. The data has multiple covariates say V1-V5. I want to evaluate the treatment effect, so I used IPTW ...
Ptyoth's user avatar
  • 1
0 votes
0 answers
70 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 ...
TY Lim's user avatar
  • 171
0 votes
0 answers
32 views

Can I use AIC or BIC to compare models fitted to the same data, but different weighting?

E.g. I have a time series data from day 1 up to day T. I want to compare models with Yt~Xt, with equal weight of all data set put more weight (like exponential decay) for the day more close to T Can ...
Mahali Sindy's user avatar
1 vote
1 answer
255 views

Paired sign and Wilcoxon tests with weighting

In R, I am using the survey package (inverse probability weighting) to conduct these tests on paired data: Weighted Wilcoxon Signed Rank test Weighted Sign test However, I am struggling in doing ...
Matteo's user avatar
  • 63
0 votes
1 answer
438 views

Calculate Inverse Probability Weights for Kaplan-Meier survival curves in R

I am analysing HR data where event is leaving (so right-censored and many more survivors than not). My Kaplan-Meier survival curves all look like this (and many of them wilder, so Cox is not an option)...
Reader 123's user avatar
2 votes
1 answer
5k views

Sample weights in LightGBM - where to specify?

I want to introduce samples weights to my lgbm classifier. From what I see the weights can be added both in the lgb.Dataset and in the ...
user377065's user avatar
11 votes
1 answer
796 views

How does class balancing via reweighting affect logistic regression?

When developing machine learning classifiers, some people upsample or upweight the minority class to achieve a 50-50 balance, claiming that this improves performance. Some statisticians have ...
Paul's user avatar
  • 10.9k
1 vote
0 answers
109 views

How does a RandomForestClassifier in sklearn use sample weights?

How does a RandomForestClassifier in sklearn use sample weights? Are sample weights applied when Random Forest bootstraps? Are sample weights applied when model fitting i.e. when training the loss ...
K1NG's QU33N's user avatar
0 votes
0 answers
108 views

How to weight probabilites of getting sampled depending on the frequency of occurrence?

Unfortunately I'm struggling to describe my problem mathematically. I have 2000 strings, many of which are repeated. Now I want to write a 'random' sampling algorithm that produces 100 samples out of ...
Zderfo's user avatar
  • 1
0 votes
0 answers
135 views

binary classification with labels of varying quality

I have a binary classification problem, where half my development data is labeled by a reliable source, and the other half by a less reliable one. Note that each instance gets a label from only one of ...
ChargeShivers's user avatar
1 vote
0 answers
24 views

Nonresponse weight adjustments in multi-stage household surveys

I have a question about nonresponse weighting in complex sample surveys in multi-stage designs, like say, The US National Comorbidity Survey Replication (NCS-R), the Health and Retirement Study (HRS), ...
SurveyStatLearner's user avatar
3 votes
1 answer
961 views

Is IPTW (inverse probability of treatment weighting) legal?

When using IPTW, one can easily get weights 10 or even 20 for the observations. For instance, in logistic regression, weight 10 for an observation means that we have not one, but 10 observations ...
Pavel Ruzankin's user avatar
1 vote
0 answers
992 views

XGBoost regressor sample weight has negligible impact on performance

I am using XGBoost regressor for a prediction problem. I did a 70/30 split for the available data (around 60K samples) to split training/validation. For the training portion, I used 80% to train the ...
Bin Zhou's user avatar
  • 111
0 votes
1 answer
165 views

Sample weighting vs. (e.g. one-hot encoded) categories

I have seen recommendations to use sample weighting when the training dataset is not evenly balanced over known categories, so that an imbalance in the number of elements in each category does not ...
Julian Moore's user avatar
1 vote
1 answer
219 views

WeightIT package error: treatment and covariates must have same number of units [closed]

While using the weightIt package in R I encountered a strange error: "error: treatment and covariates must have same number of units" Now, checking the root code of the package and this ...
user207581's user avatar
3 votes
1 answer
134 views

Domain adaptation under covariate shift: estimating density ratio through a classifier

In domain adaptation under covariate shift, one approach is to weight the instances from the source domain by a factor $\frac{p_T(x)}{p_S(x)}$ in the training, where $p_S(x)$ and $p_T(x)$ represent ...
Lei Huang's user avatar
  • 956
1 vote
1 answer
21 views

How to handle different sized experiment samples

Imagine a 3 by 1 experiment. One group has 1,000 observations, one with 5,000 observations, and 4,000 observations in the last group. I'm trying to see whether the manipulation between groups in the ...
Eric Tim's user avatar
0 votes
1 answer
29 views

What is the sample size and variance for the mean that is a simple, unweighted average of two independent groups' means?

We have two groups: N1 = 10 and N2 = 100 Their means on some measurement are: Mean1 = 4 and Mean2 = 5 Their variances are Var1 = 3 and Var2 = 2.5. Let's further assume we have no access to the ...
dl7631's user avatar
  • 3
0 votes
1 answer
1k views

Including a weighting variable in a linear regression

I'm looking at how temperature affects length. My length variable is the mean length calculated for every year, it is derived from ~10,000 data points. Not every year had the same sampling effort (e.g....
watermineporcupine's user avatar
2 votes
0 answers
94 views

How should one compute confidence intervals for means computed with inverse propensity weights (IPW)?

Inverse propensity weighing involves a machine learning model that takes features and outputs the predicted probability that this person is in the sample. Let $w_i$ be the inverse of the output for ...
Andrew NC's user avatar
  • 319
2 votes
1 answer
223 views

Weighted Survey Predicted Probabilities

I have a question about calculating prevalence using predicted probabilities from a survey weighted generalized linear model. Say my goal was to calculate the prevalence of a binary outcome using the ...
jacqui_suis's user avatar
3 votes
1 answer
1k views

Minimize SSE function

Consider a data set in which each target $t_n$ is associated with a weighting factor $r_n > 0$, so that the sum-of-squares error funtion becomes $$SE(w)= \frac{1}{2} \sum_{n=1}^N r_n \left(\...
Marcel Braasch's user avatar
3 votes
3 answers
245 views

Weighting significance tests according to the appropriateness of their assumptions

Consider a t-test of means. One formula for computing the p-value assumes equal variances. Another formula assumes unequal variances. With small sample sizes the tests can give quite different ...
Tim's user avatar
  • 3,391