Posts Tagged ‘ Bootstrap and Resampling ’

The smooth bootstrap method in SAS

August 17, 2016
By
The smooth bootstrap method in SAS

Last week I showed how to use the simple bootstrap to randomly resample from the data to create B bootstrap samples, each containing N observations. The simple bootstrap is equivalent to sampling from the empirical cumulative distribution function (ECDF) of the data. An alternative bootstrap technique is called the smooth […] The post The smooth bootstrap method in SAS appeared first on The DO Loop.

Read more »

Compute a bootstrap confidence interval in SAS

August 10, 2016
By
Compute a bootstrap confidence interval in SAS

A common question is "how do I compute a bootstrap confidence interval in SAS?" As a reminder, the bootstrap method consists of the following steps: Compute the statistic of interest for the original data Resample B times from the data to form B bootstrap samples. How you resample depends on […] The post Compute a bootstrap confidence interval in SAS appeared first on The DO Loop.

Read more »

Four essential sampling methods in SAS

February 15, 2016
By
Four essential sampling methods in SAS

Many simulation and resampling tasks use one of four sampling methods. When you draw a random sample from a population, you can sample with or without replacement. At the same time, all individuals in the population might have equal probability of being selected, or some individuals might be more likely […] The post Four essential sampling methods in SAS appeared first on The DO Loop.

Read more »

Sample with replacement and unequal probability in SAS

February 10, 2016
By
Sample with replacement and unequal probability in SAS

How do you sample with replacement in SAS when the probability of choosing each observation varies? I was asked this question recently. The programmer thought he could use PROC SURVEYSELECT to generate the samples, but he wasn't sure which sampling technique he should use to sample with unequal probability. This […] The post Sample with replacement and unequal probability in SAS appeared first on The DO Loop.

Read more »

Resampling and permutation tests in SAS

November 21, 2014
By
Resampling and permutation tests in SAS

My colleagues at the SAS & R blog recently posted an example of how to program a permutation test in SAS and R. Their SAS implementation used Base SAS and was "relatively cumbersome" (their words) when compared with the R code. In today's post I implement the permutation test in […]

Read more »

Permute elements within each row of a matrix

May 29, 2014
By
Permute elements within each row of a matrix

Bootstrap methods and permutation tests are popular and powerful nonparametric methods for testing hypotheses and approximating the sampling distribution of a statistic. I have described a SAS/IML implementation of a bootstrap permutation test for matched pairs of data (an alternative to a matched-pair t test) in my paper "Modern Data […]

Read more »

Sample without replacement in SAS

February 3, 2014
By
Sample without replacement in SAS

Last week I showed three ways to sample with replacement in SAS. You can use the SAMPLE function in SAS/IML 12.1 to sample from a finite set or you can use the DATA step or PROC SURVEYSELECT to extract a random sample from a SAS data set. Sampling without replacement [...]

Read more »

Sample with replacement in SAS

January 29, 2014
By
Sample with replacement in SAS

Randomly choosing a subset of elements is a fundamental operation in statistics and probability. Simple random sampling with replacement is used in bootstrap methods (where the technique is called resampling), permutation tests and simulation. Last week I showed how to use the SAMPLE function in SAS/IML software to sample with [...]

Read more »

Sampling with replacement: Now easier than ever in the SAS/IML language

January 23, 2014
By
Sampling with replacement: Now easier than ever in the SAS/IML language

With each release of SAS/IML software, the language provides simple ways to carry out tasks that previously required more effort. In 2010 I blogged about a SAS/IML module that appeared in my book Statistical Programming with SAS/IML Software, which was written by using the SAS/IML 9.2. The blog post showed [...]

Read more »

Output percentiles of multiple variables in a tabular format

October 23, 2013
By
Output percentiles of multiple variables in a tabular format

A challenge for statistical programmers is getting data into the right form for analysis. For graphing or analyzing data, sometimes the "wide format" (each subject is represented by one row and many variables) is required, but other times the "long format" (observations for each subject span multiple rows) is more [...]

Read more »


Subscribe

Email:

  Subscribe