# 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.

192 questions
Filter by
Sorted by
Tagged with
22 views

### Stratify Cox Proportional Hazard Model on continuous variable

I have a question regarding Cox proportional hazard models. I've been working with data with some time-varying variables and some that are fixed over time. In total 79 units are surveyed giving around ...
374 views

### How do I do stratified sampling on group-separated datasets in Python? Do packages for this exist?

Say I have the following data: ...
27 views

### Why adjusting for randomization stratification factors in the model improves the precision of estimators for treatment effect?

I assume you will already get balanced treatment assignment within the randomization strata. Why would we still gain improvement in precision by adjusting for these factors in the model? Does not ...
313 views

### Stratified bootstrapping and confidence intervals

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 ...
13 views

### Age stratified analysis in R

I am working on a project for which I need to do age stratified analysis for age of onset, age at last visit to the hospital and age at death. Our collaborator wants me to create an "Age ...
719 views

### Calculating Sample Size for Non-Inferiority Test in Cox Proportional Hazards Regression With Stratification

I have a binary predictor, X, in a Cox proportional hazards regression model, and I want to show that it is NOT a significant predictor. In other words, I want to show that there is not a significant ...
19 views

### One random sample Mean or 30 Random samples Mean

I have 30m records and i want to do a random stratified sample to estimate the mean based on predefined strata. Should i estimate the mean while taking 1 random (n=500) sample or to sample lets say 30 ...
13 views

### Difference between stratification and subset

This may be a duplicate question asked differently, I am curious to know the difference between performing an analysis by stratification on a variable and by subsetting the dataset based on that ...
551 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 ...
18 views

### Stratified sampling

I am learning about stratified sampling, and I have the following question: can stratified sampling achieve more precision than SRS if data is plentiful and the samples are big enough? For example, it ...
9 views

### When splitting a dataset into train/dev/test sets, how perform stratified splits on some labels but exclusion split on others?

Suppose I have a dataset of 1000 samples with label classes A, B or C that I want to split into train/dev/test sets in a stratified fashion. However, each sample has an origin metadata (o1, o2, o3, ......
5 views

### How do I calculate the survey sample size using stratified sampling?

Lets say I plan to do a survey of individuals aged 40-69 years old in 5 residential complexes. It is a general social survey, and is intended to survey attitudes towards a new cultural centre that ...
14 views

### How to set break values for a cross-basis function in R's DLNM package?

I am using distributed lag non-linear model in R for a time series data. I am forming a crossbasis matrix using following script: ...
1k views

### Relation between Stratify Sampling and Blocking

In experiment, if you know before that an attribute $X$ may affect the treatment effect, so you could do stratify sampling from your target population, e.g., if $X$ is weight, then you could divide ...
177 views

### Are the differences between sampling clusters and sampling strata, conceptual, methodological, neither or both?

I am fuzzy on the distinctions between sampling strata and sampling clusters. Both seem to aim at designs aiming at creating useful estimates of between/within group (strata, cluster) variation, and ...
32 views

### Stratified logistic regression with log link

I noticed the other day that I can mimic a stratified logistic regression using a meta-analytic approach at least when there is only one stratification variable with two different values. This is the ...
11 views

### Stratified Sampling Total Statum

I wish to find the number of total population by each specification. I have the following results: \begin{array}{|c|c|} class & n_h \\\hline Positive & 5872 \\\hline Neutral & 6771 \\\...
264 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 ...
362 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 ...
751 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 ...
10 views

### Long-tailed predictors for likelihood prediction

I have a set of long-tailed predictors and a binary target variable. The long-tailed predictors have also 0 values. The data-set is imbalanced with about 5% of positive class samples. I would like to ...
19 views

### what is the best sampling procedure to use? (stratified)

all, i am a little confused on what sampling method to use. i am doing a classification problem where i am trying to classify a person as having cancer or not. there is apparently huge variance in ...
387 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 ...
125 views

### Main options on how to deal with imbalanced data

As far as I can tell, broadly speaking, there are three ways of dealing with binary imbalanced datasets: Option 1: Create k-fold Cross-Validation samples randomly (or even better create k-fold ...
77k views

### Understanding stratified cross-validation

I read in Wikipedia: In stratified k-fold cross-validation, the folds are selected so that the mean response value is approximately equal in all the folds. In the case of a dichotomous ...
14 views

### Should I maximize the number of respondent (total or per strata), or the similarity between the sample and the general population?

I want to conduct a market research survey. I want to interpret results for both the general population, which is very large, and also for age and household income subgroups. With the limited budget ...
28k 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. ...
11k 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 ...
38 views

### How to explain that leave-one-out cross-validation doesn't need stratification in the context of classification?

Stratification is usually defined as training data and testing data having the same distribution of class values. In leave-one-out cross-validation, each fold only has 1 instance. I know that it's ...
22 views

### Distribution of the grand mean (mean of means), and case of stratified sampling

I am having some trouble while estimating the distribution of the mean of means, according to the type of sampling. Basically, I sampled N=1000 sets of n=100 random numbers distributed as an uniform ...
23 views

### Randomized blocking “after the fact”

I have 5 treatments that I'm going to randomly assign to visitors to my website. I'll have 10,000 or more visitors. Is it statistically valid to analyze the results based on visitor characteristics ...
20 views

### Post Stratification & Calibration? - Adding weight's - CALMAR

Let's suppose that I want to compare the average spending of both groups and I have two groups with 2 features in each one: Each client is unique and CityCode has only 2 groups CA and CB and AgeCode ...
78 views

### Asymptotic variance of Metropolis-Hastings estimates on a disjoint subdivision of the state space

I'm running the Metropolis-Hastings algorithm on a state space $(E,\mathcal E)$ which can be disjointly subdivided into regions $E_1,\ldots,E_k$, $k\in\mathbb N$ ($k\approx1e5$). On $E$, I have a ...
13 views

### Stratified Sampling vs. Hand picking a “random sample”, and using Chi-Squared as justification. Dichotomous outcome methods question

Suppose I would like to evaluate "the proportion of potato farms in Idaho that use pesticides". (dichotomous yes/no outcome variable). Now let's assume I know the exact number of potato farms in Idaho,...
70 views

### Sample stratification by dependent variable in linear regression analysis

I have a theoretical question that I would like some guidance on. Is it ok to stratify a sample population by the dependent variable? Does this bias regression results? For example, I'm doing an ...
96 views

### Choosing strata in stratified log-rank test

Let's say I would like to see which factors affect the survival of patients suffering from cancer. And let's assume I have two variables: chemo ($0$ - if a patient is not treated with chemotherapy or ...
9 views

### test of difference (equivalence) between pairs of hazard ratios derived from two models

I have two stratified cox proportional hazards regression models each restricted to data on men and women, respectively. Both models have the same covariates and the data on men and women come from ...
1k views

### Possible catch 22 with Neyman's optimal allocation

I am using stratified sampling and neyman's optimal allocation to compute the best sample size for each stratum. neyman's optimal allocation is given by the formula, n_h = n \frac{N_h * S_h}{\sum_i ...
245 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 ...
166 views

### Sample stratified according to region - how representative is this sample on the regional level?

I am doing a survey analysis of a specific country, and I am interested in comparing different regions of that country. Generally speaking (if possible), when a sample is stratified according to ...
16 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?
35 views

### Analysing stratified random sample

Let's say I am analysing an experimental design with treatment and control group which was based on random sampling design stratified on a number of covariates. When analysing the data I see two ...