Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

Questions tagged [stratification]

A sampling technique in which the population of interest is partitioned into subsets ("strata") based on characteristics known at all units before sampling.

Filter by
Sorted by
Tagged with
1
vote
1answer
139 views

Neyman allocation and proportional allocation

Suppose that a city has 90,000 dwelling units, of which 35.000 are houses, 45,000 are apartments, and 10,000 are condominiums. We want to estimate the overall proportion (p) of households in which ...
18
votes
1answer
18k views

Benefits of stratified vs random sampling for generating training data in classification

I would like to know if there are any/some advantages of using stratified sampling instead of random sampling, when splitting the original dataset into training and testing set for classification. ...
0
votes
0answers
24 views

Should I use stratify parameter for scikit-learn train_test_split while dealing with highly unbalanced dataset?

I have a dataset with over 200000 records. Only 400 of are positive, which makes the data highly unbalanced. I cannot collect more data. At first I trained a decision tree. I used StratifiedKFold and ...
0
votes
0answers
6 views

Experiment design: what's the difference between diff in diff and post-stratification?

what's the difference between diff in diff and post-stratification? When should we use diff in diff and when should we use post_stratification quasi experiment design?
0
votes
0answers
19 views

Variance of estimator of stratified sampling

Consider a stratified design composed of $H$ strata of size $N_h$, $h = 1, . . . ,H$. We want to estimate the population mean $μ_y$ of the characteristic $y$. Let $μ_{x,h}$ $h = 1, . . . ,H$ be ...
2
votes
2answers
239 views

Why class stratified sampling is not compatible for naïve bayesian modeling, if sampling is used?

I read a book recently and it mentioned related to prior probability of naïve bayesian: "Since the probability of an outcome is calculated from the data set, it is important that the data set used ...
4
votes
1answer
525 views

How to do a stratified nonparametric test?

I'm trying to use the "coin" (conditional inference) package to perform a stratified nonparametric test for difference in distribution (for count data). I tried a stratified Mann-Whitney-Wilcoxon ...
0
votes
1answer
20 views

How to perform inference on stratified sampling data

Let's say I'm studying a population of generic emergency calls to over the course of several months, and keeping track of the following independent variables: month (when the call happened) country (...
0
votes
1answer
226 views

Cluster Analysis on a Stratified Random Sample

I have a set $A$ that consists of 5 million objects. Each object has a color, size and cost. I'd like to do a cluster analysis, e.g. K-means, on cost. However, it is computationally not feasible to ...
0
votes
0answers
21 views

Stratification of sample data is lowering my accuracy?

So I've got this trainingset, it has a bunch of stuff yada yada.. Main point is that there are two target variables that only occur once in the dataset. This means I can't stratify when sampling, I ...
1
vote
0answers
10 views

Simulate confidence intervals for the absolute difference between two hazard ratios

I am examining the time to an (recurrent) event in response to different medications between men and women. I am adopting a 'within-individual' design whereby each person's time spent on- and off- the ...
1
vote
1answer
194 views

Stratified Sampling Allocation

You believe that the mean electricity usage is about twice as much for houses as for apartments or condominiums, and that the standard deviation is proportional to the mean so that S1 = 2S2 = 2S3. How ...
0
votes
0answers
21 views

Is doing oversampling on train set and undersampling on test set correct?

I have an imbalanced dataset (95% in class 0 and 5% in class 1) and I am using machine learning for classification. The AUC(Area under ROC curve) was high (about 0.86) but AUPRC(Area under precision-...
0
votes
1answer
164 views

Optimal multivariate binning where the cut-points must be the same for all observations

I have a large data set with many discrete and continuous variables. All the variables are present in every observation. I want to explain (the log of) one continuous variable using all the other ...
0
votes
1answer
231 views

How to partition data with multiple categorical features?

I have a data set with size of 30k+, and it has several categorical features and also several numerical features. When I try to split the data into training/testing data set, I need to answer a ...
0
votes
0answers
11 views

Interaction results in two datasets are concordant, but stratified analyses are not

Let's suppose I want to explore the relationship between a variable (SNP, {0,1,2}) and a disease outcome (D, continuous value such as blood pressure), knowing that this is different in two groups, let'...
28
votes
2answers
16k views

Why use stratified cross validation? Why does this not damage variance related benefit?

I've been told that is beneficial to use stratified cross validation especially when response classes are unbalanced. If one purpose of cross-validation is to help account for the randomness of our ...
1
vote
0answers
33 views

multilevel regression and poststratification mrp

I have some survey data. I want to calculate a regression with a stratified sample of this data. Because of the stratification, the sample size gets really small. Due to this, the standard error of ...
0
votes
0answers
8 views

Estimating a population proportion and credible interval from a biased stratified sample

I am attempting to calculate a point estimate and the upper 95th percentile (one sided credible interval) for a defect rate (i.e. a population proportion) using the results of a biased stratified ...
2
votes
1answer
65 views

Determine sample size using reversed goodness of fit

I am asked to work on a specific problem in which I have to calculate certain expenditures for an industry, consisting of a population of about 400 companies. Although I already suggested to conduct a ...
0
votes
1answer
63 views

Stratified Sampling on Random Forest

I am working on a project to detect crops from satellite images by prediction. To do so, I use Random Forest model. I discussed with some people about whether to give sample weights on each tree in ...
0
votes
2answers
28 views

k-fold CV-scheme stratifying response and considering groups

I have the following small dataset (n~140): 1-8 samples per patient A small fraction of samples belonging to the negative class (no tumor), ~ 10-20% A larger fraction of samples belonging to the ...
0
votes
0answers
8 views

How fine is the finest cluster level in a sample with individual data?

When using software to estimate the variance or standard error of statistics calculated from complex survey samples with clustering and stratification, if the sample contains data on individuals, is ...
4
votes
1answer
1k views

Bootstrapping dataset with imbalanced classes

I am trying to build an ensemble model to classify dataset with imbalanced data, where some of classes have just a few samples. And, because of this dataset property, when I am doing re-sampling with ...
0
votes
0answers
13 views

How to do post-stratification weighting in sampled groups with low or zero cell populations?

Let's say you received data from a sample. You don't have information on the sample design, but you have population data so you want to employ post-stratification weights to better align the sample ...
0
votes
0answers
22 views

Multiple Imputation with categorical variable for treatment: Do I have to impute stratified by treatment?

I want to impute data for a clinical trial with four treatments and analyze the data to determine if there is a treatment effect. Normally I would perform the imputation stratified by treatment so ...
2
votes
1answer
233 views

Interaction variables work differently when population is split

Let's say I have two predictors to predict financial risk: Gender and shopping habits. Gender has levels of "Male" and "Female", while shopping habits has "quick shopper" and "slow shopper". I am ...
0
votes
0answers
4 views

Stratified Log Rank Test with Unequally Sized Strata

If I perform a stratified log rank test in a situation with many strata (currently I have 8), in 6 of the 8 there are very small numbers (i.e., 1 or 2%), but the other strata are fairly balanced, how ...
0
votes
0answers
17 views

Stratification or minimisation…Necessary with sample sizes exceeding 250?

I was having a discussion with a statistician who developed a simple software package to do participant group allocation using the minimisation technique. In this discussion the person mentioned that ...
0
votes
2answers
140 views

Interpreting hazard ratios in stratified models

I am unsure how to interpret hazard ratios from cox-proportional hazard models that include 1 or more stratified terms. For example, say I run a cox regression with treatment as a covariate and ...
1
vote
1answer
799 views

what's the difference between stratified sampling and matching?

I am trying to find a good technique to balance data in which the minority class is about 1% of the data. As I understood, the most common practice is matching. What is the difference, though, ...
0
votes
0answers
24 views

compute AUC and statistical testing of stratified data

I have a dataset where samples are stratified in groups. That is, there are N samples per examination, and M examinations per subject. I would like to account for this when estimating the ...
1
vote
0answers
179 views

Calculating a sample size based on the target width of a confidence interval with stratification

I am reviewing a sampling design devised by a colleague and completely fail to understand it, although I am not a novice in statistics (but not a huge expert either). The said colleague is no longer ...
2
votes
1answer
64 views

Odds ratio not between the two odds ratio of a stratified analysis

This is not the first time I have performed stratified analyses based on logistic regressions, but I have never before been confronted with this situation. When I test my relationship in the overall ...
13
votes
1answer
1k views

Does fitting Cox-model with strata and strata-covariate interaction differ from fitting two Cox models?

In Regression Modeling Strategies by Harrell (second edition) there is a section (S. 20.1.7) discussing Cox models including an interaction between a covariate whose main effect on survival we want to ...
3
votes
1answer
740 views

Reweighting sample to reflect census?

I'm working on a revision of a manuscript. I have a longitudinal cohort of adolescents that were followed throughout junior high school. One of the reviewers considers the attrition to be considerable,...
0
votes
1answer
32 views

random vs. stratified Cox model

What is the difference in interpretation of the effect estimates in a Cox model stratified by sex vs. with a random statement for sex? Thanks.
0
votes
1answer
770 views

Difference between Multistage Sampling and Stratified Random Sampling?

I know the question is a very elementary one, but I simply cannot understand the difference other than the fact that an SRS is a form of Multi-Stage Sampling. Can anyone provide a simple example(s) to ...
0
votes
0answers
9 views

Difference between Confounding and Effect Modifier

I am searching everywhere about the differences between Confounding and Effect modifier, but not able to find it. Kindly help me in this. Can you please answer using examples rather than definitions.
0
votes
0answers
54 views

Should stratified cross-validation be used in a regression context?

After a number of Google searches and looking at various stack posts, I cannot find much information or discussion about using stratified cross-validation in regression context. I am modeling forest ...
0
votes
0answers
60 views

Nested CV with Stratified Kfold

I am using nested CV for model evaluation and my target variable has imbalanced classes. With Sklearn, I am using GridSearchCV and cross_val_score to perform the nested cross validation. Each takes ...
0
votes
0answers
64 views

Calculating sample size for a stratified random sample

I have a total population of 4,000 farmers, divided into three unique regions. Approximately 50% of the farmers live in Region A (N=2,000), 27% in Region B (N=1,080), and 23% in Region C (N=920). I am ...
0
votes
0answers
8 views

Least square estimate for post-stratification sampling

I figured out via the normal linear regression method that Beta0 hat = ybar - Beta1 hat xbar. But I am not sure how to find out the least square estimate for Chat. Is anyone able to help me? Thanks!! ...
0
votes
0answers
14 views

Stratified Sampling: Given required bound, calculated $n_h$ is bigger than $N_h$?

I'm dealing with a question that has given me a peculiar result and I would like someone's opinion on how to deal this: Say you have a population of $N=550$ objects: $N_1=75$ red and $N_2=475$ blue. ...
0
votes
0answers
17 views

Stratifying a multivariate dataset

I woul like to stratify a multivariate dataset in different stratas in such a way that the elements of each strata are similar. My idea is to have different groups whith the element within a group ...
0
votes
0answers
177 views

Fold size and stratified k-fold cross-validation dilemma

So, as far as I understand, all folds in k-fold cross-validation need to be the same size, or as close as possible. However, if one uses stratified cross-validation, each class should be represented ...
1
vote
0answers
142 views

how to use boot package to do stratified bootstrapping?

Here's a toy data set that replicates my problem. I am interested in knowing the confidence intervals of an empirical distribution that is composed of the scores of each school at the proportion that ...
0
votes
0answers
31 views

What methods exist for multi-output stratification (multi-label with different mutually exclusive label sets)?

To elaborate a bit: Methods do exist for single-output multi-label stratification (e.g., see scikit-multilearn). And there's a perfectly serviceable naive method for multi-class problems. The ...
0
votes
0answers
180 views

Stratified cross validation with groups

I have a model for a binary classification problem that I want to cross validate. The data is divided into groups. Some groups contain samples in both classes, others only contain samples from one ...