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.

46
votes
3answers
50k views

Understanding stratified cross-validation

What is the difference between stratified cross-validation and cross-validation? Wikipedia says: In stratified k-fold cross-validation, the folds are selected so that the mean response value is ...
25
votes
2answers
15k 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 ...
13
votes
1answer
13k views

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

I would like to know if there are advantages of using stratified sampling instead of random sampling, when splitting the original dataset into training and testing set for classification. Also, does ...
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 ...
12
votes
2answers
749 views

Empirical distribution alternative

BOUNTY: The full bounty will be awarded to someone who provides a reference to any published paper which uses or mentions the estimator $\tilde{F}$ below. Motivation: This section is probably not ...
11
votes
2answers
6k views

Sampling with replacement in R randomForest

The randomForest implementation does not allow sampling beyond the number of observations, even when sampling with replacement. Why is this? Works fine: ...
11
votes
1answer
2k views

Stratified classification with random forests (or another classifier)

So, I've got a matrix of about 60 x 1000. I'm looking at it as 60 objects with 1000 features; the 60 objects are grouped into 3 classes (a,b,c). 20 objects in each class, and we know the true ...
9
votes
3answers
2k views

Multilevel model vs. separate models for each level

What are the advantages and disadvantages of running separate models vs. multilevel modeling? More particularly, suppose a study examined patients nested within doctors' practices nested within ...
7
votes
2answers
2k views

Why is random assignment important in stratified sampling?

Background I raised this question because of an argument I am having with a question from user697473 here. The title of his question is "Formal definiton of random assignment." In the post he ...
7
votes
2answers
4k views

Remove duplicates from training set for classification

Let us say I have a bunch of rows for a classification problem: $$X_1, ... X_N, Y$$ Where $X_1, ..., X_N$ are the features/predictors and $Y$ is the class the row’s feature combination belongs to. ...
7
votes
1answer
1k views

Is stratified meta-analysis more or less objective than meta-regression?

Reviewer asked me why I use meta-regression as a way how to deal with heterogeneity among effect sizes instead of conducting stratified meta-analysis. I tried to google "stratified meta-analysis" and ...
7
votes
3answers
3k views

Simple post-stratification weights in R

I just got my hands on the ANES (American National Election Studies) 2008 data set, and would like to do some simple analysis in R. However, I've never worked with this complex of a data set before ...
7
votes
1answer
2k views

Machine learning with weighted / complex survey data

I have worked a lot with various nationally representative data. These data sources have a complex survey design, so the analysis requires the specification of stratification and weight variables. ...
7
votes
0answers
177 views

How to construct confidence limits based on small stratified samples of finite populations?

Imagine a business wishes to audit its transactions. It has a database summarizing the transactions, which constitute a sampling frame for the population. It would be time-consuming and expensive to ...
6
votes
1answer
8k views

Stratified sampling with multiple variables?

I don't know much about stats so I'm looking for a starting point here. Any resources or insights would be helpful. I'm conducting an e-learning experiment, in which students watch videos and then ...
6
votes
1answer
150 views

Post-stratification & quantitative variables

I'm in charge of contacting customers of a company in order to analyse their satisfaction. The problem is I contact them by phone and the people I contact (the sample) are not representative of the ...
5
votes
2answers
702 views

When using stratified randomization in a RCT, how many envelopes per stratum should be prepared?

If one considers a hypothetical RCT, say a total sample size of 300, separated into three strata based on surgical procedure (open surgery, closed surgery, or combined procedure). Blocking in groups ...
5
votes
1answer
2k views

Fisher overall p-value vs. pairwise comparisons

I am doing comparisons on response rates across three sites. Following are the cell counts ...
5
votes
1answer
5k views

Bootstrapping stratified sample that is weighted to population - reweighting during the bootstrap?

I'm using R to provide bootstrap (percentile and t methods) of estimated population totals, using data from a complex survey. It is a stratified survey of tourists expenditure that is weighted to ...
5
votes
1answer
2k views

Confidence interval for a proportion estimated through stratified sampling

When estimating the confidence interval for a binomial proportion $p$, with $\hat{p}$ near 0 or 1, one has to use something other than the Wald interval to get a reasonable estimate (see for instance ...
5
votes
0answers
431 views

Election fraud detection: the statistics of Quick Count

I’m reading the book Quick Count and Election Observation (chapter 5). I’m interested in understanding the statistics used in Quick Counts. Quick Counts is a methodology for verifying official ...
4
votes
2answers
1k views

Stratified sampling question

Suppose that I am conducting a questionnaire study that is trying to measure level of awareness of subjects about a programming language and find the relation of those level of awareness to working ...
4
votes
2answers
128 views

Are the precision gains from stratified sampling a free lunch?

I'm following the discussion in Field Experiments by Gerber and Green, Chapter 3 as well as these resources: http://ocw.jhsph.edu/courses/StatMethodsForSampleSurveys/PDFs/Lecture4.pdf http://home....
4
votes
2answers
2k views

Using post-stratification weights in R survey package

I am analyzing a dataset that has a variable for post-stratification weights. As this is a complex survey, the plan is to use the R survey package. I have been ...
4
votes
1answer
120 views

Downsides of stratified randomization in experimental design

When sample sizes are too small to trust that the usual asymptotics will guarantee good balance across experimental groups on known confounders, a common approach is stratified or blocked ...
4
votes
1answer
7k views

How to stratify a dataset to keep groups of data together in Python?

I have a dataset I want to use for machine learning that looks something like this: ...
4
votes
2answers
840 views

How does the boot package in R handle collecting bootstrap samples if strata are not specified but the function separates the dataset by strata?

My current understanding is 1) if strata are not specified, then boot randomly selects rows with replacement from the entire dataset. If dataset is actually stratified then boot would often return ...
4
votes
1answer
263 views

How to efficiently expand a simple random sample after population growth?

I have a simple random sample (SRS) $S$ of size $n$ drawn from a population $D_1$ containing $N_1$ members. A new set $D_2$ with $N_2$ members is added to the population. I would like to create a ...
4
votes
1answer
127 views

What are the optimizations or goals to consider when using stratified sampling?

In stratified sampling, what are the optimization considerations? For example, the sample size per stratum could be defined with proportional allocation as $n_h=n\frac{N_h}{N}$, where $N_h$ is the ...
4
votes
0answers
68 views

an alternative allocation method for small RCTs?

stratification and minimization are two randomization options to achieve balance in terms of covariates or baselines in small RCTs. in recent years, researchers seem to have favoured minimization, ...
4
votes
0answers
626 views

Stratified Cross-Validation with Collaborative Filtering

My dataset consists of binary preferences ($0$ or $1$) given by users on items like this: User-ID | Item-ID | Preference If a user has not given a preference to an item, then it is not in the ...
3
votes
1answer
781 views

Using strata instead of stratifying groups separately?

Can someone help me understand what strata(groups) does when it is used as a covariate? I am used to seeing stratified models where each level is run as a separate model, so that you can get ...
3
votes
2answers
66 views

Stratified sampling without sampling

At school we talked about stratified sampling regarding scientific studies. I thought of a similar case: Let's assume you have 4 questions for a certain number of people. Each of those people should ...
3
votes
1answer
608 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,...
3
votes
1answer
708 views

Two sample tests for stratified randomization

I have to test the difference between two samples which were selected via stratified randomization. The problem is that the samples are not independent due to randomization was stratified. How should ...
3
votes
2answers
9k views

When do you stratify an analysis versus including an interaction term?

I’m not very familiar with when and why you would stratify on a variable or set of variables in a regression analysis generally and would like to know what the issues are particularly in contrast to ...
3
votes
1answer
951 views

Stratified Cox model

I am working on fitting a Cox model to predict. But several predictors violated the proportional hazards assumption. I am gonna to do stratified Cox model to adjust them. But the results of stratified ...
3
votes
1answer
656 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 ...
3
votes
2answers
1k views

Beta coefficients from stratified analysis when there are covariates?

Suppose I have a regression model shown below Model 1: $$ Y = \beta_0^\ + \beta_1SEX\ + \beta_2ALCOHOL\ + \beta_3SEX*ALCOHOL\ $$ The predictors I am interested in are SEX (binary: 0 female, 1 male) ...
3
votes
1answer
115 views

Difference in estimating treatment effect in experiment using regression with covariates and assuming the data come from stratified experiment?

Assume I only did a completely randomized experiment (CRE), i.e., $N$ subjects, I randomly assign $N_t$ (say $N_t=N/2$) of them to the treatment group and the rest to the control group. Now, after I ...
3
votes
1answer
71 views

Stratification based on propensity score and a second variable

The basis of my question is whether it makes sense, given you have a set of propensity scores, to stratify the data based on the propensity scores and on a second variable which was included in the ...
3
votes
1answer
3k views

How to conduct Cox PH stratisified by matched pair in R

I am wanting to calculate hazard ratio in a matched cohort design. For such I am using the coxph() function in R. But I have been recommended to stratify by matched ...
3
votes
0answers
432 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 ...
3
votes
0answers
65 views

Stratum on subset of data: drop if too small?

We have genotype data for ~20000 samples with 4 principal components and 10 strata - study centres. Formula for an example analysis would be: ...
3
votes
0answers
45 views

Can unintentional sample stratification be problematic?

An example of what I mean: I have a certain essay from all students at a university. I take a 1% random sample (not stratified) and run some time consuming computational analysis on each essay ...
2
votes
1answer
53 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 ...
2
votes
3answers
197 views

Derive househould weights from a uniformly distributed person sample

The Swiss Public-Use Sample of the national census is a 5% sample drawn from the entire census survey. According to the documentation, the persons are sampled uniformly without replacement. Persons ...
2
votes
2answers
384 views

How to partition a training-set when I have a big class imbalance?

In my actual data class A has 90%, class B has 9% and class C has 1% (numbers are made up for sake of simplicity). Now I want to prepare a training set for my classifier (I plan to use Vowpal Wabbit). ...
2
votes
1answer
448 views

Stratified random sampling when strata overlap

I am sure the title might be confusing, but here is what I am dealing with: I am running a survey at a health care center. The health center has around 15k active visitors. There are 5 departments ...
2
votes
1answer
1k views

Splitting Longitudinal Data into Training & Test Sets [closed]

I'm trying to find a simple way to split some longitudinal data into a training and test set. I'm familiar with using the Caret package in R to make stratified splits, but only with wide-form data. It ...