Posts Tagged ‘ simulation ’

Independent streams of random numbers in SAS

May 9, 2018
By
Independent streams of random numbers in SAS

In a previous blog post, I discussed ways to produce statistically independent samples from a random number generator (RNG). The best way is to generate all samples from one stream. However, if your program uses two or more SAS DATA steps to simulate the data, you cannot use the same

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Independent streams of random numbers in SAS

Independence and overlap in streams of random numbers

May 7, 2018
By
Independence and overlap in streams of random numbers

Simulation studies require both randomness and reproducibility, two qualities that are sometimes at odds with each other. A Monte Carlo simulation might need to generate millions of random samples, where each sample contains dozens of continuous variables and many thousands of observations. In simulation studies, the researcher wants each sample

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Independence and overlap in streams of random numbers

Random permutations without duplicates

April 16, 2018
By
Random permutations without duplicates

A colleague and I recently discussed how to generate random permutations without encountering duplicates. Given a set of n items, there are n! permutations My colleague wants to generate k unique permutations at random from among the total of n!. Said differently, he wants to sample without replacement from the

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Random permutations without duplicates

A zipper plot for visualizing coverage probability in simulation studies

March 26, 2018
By
A zipper plot for visualizing coverage probability in simulation studies

Simulation studies are used for many purposes, one of which is to examine how distributional assumptions affect the coverage probability of a confidence interval. This article describes the "zipper plot," which enables you to compare the coverage probability of a confidence interval when the data do or do not follow

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on A zipper plot for visualizing coverage probability in simulation studies

The distribution of shared birthdays in the Birthday Problem

February 7, 2018
By
The distribution of shared birthdays in the Birthday Problem

If N random people are in a room, the classical birthday problem provides the probability that at least two people share a birthday. The birthday problem does not consider how many birthdays are in common. However, a generalization (sometimes called the Multiple-Birthday Problem) examines the distribution of the number of

The post Read more »

Tags: ,
Posted in SAS | Comments Off on The distribution of shared birthdays in the Birthday Problem

Simulate the birthday-matching problem

February 5, 2018
By
Simulate the birthday-matching problem

This article simulates the birthday-matching problem in SAS. The birthday-matching problem (also called the birthday problem or birthday paradox) answers the following question: "if there are N people in a room, what is the probability that at least two people share a birthday?" The birthday problem is famous because the

The post Read more »

Tags: ,
Posted in SAS | Comments Off on Simulate the birthday-matching problem

How to use random-number generators in SAS

January 29, 2018
By
How to use random-number generators in SAS

What is a random number generator? What are the random-number generators in SAS, and how can you use them to generate random numbers from probability distributions? In SAS 9.4M5, you can use the STREAMINIT function to select from eight random-number generators (RNGs), including five new RNGs. After choosing an RNG,

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on How to use random-number generators in SAS

Type I error rates in two-sample t-test by simulation

January 28, 2018
By

What do you do when analyzing data is fun, but you don't have any new data? You make it up.

This simulation tests the type I error rates of two-sample t-test in R and SAS. It demonstrates efficient methods for simulation, and it reminders the reader not to take the result of any single...
Read more »

Tags: , , ,
Posted in SAS | Comments Off on Type I error rates in two-sample t-test by simulation

Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.

Sponsors







Dear readers, proc-x is looking for sponsors who would be willing to support the site in exchange for banner ads in the right sidebar of the site. If you are interested, please e-mail me at: tal.galili@gmail.com
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.