Posts Tagged ‘ simulation ’

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

Data unavailable? Use the “eyeball distribution” to simulate

January 15, 2018
By
Data unavailable? Use the “eyeball distribution” to simulate

Last week I got the following message: Dear Rick: How can I create a normal distribution within a specified range (min and max)? I need to simulate a normal distribution that fits within a specified range. I realize that a normal distribution is by definition infinite... Are there any alternatives,

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Data unavailable? Use the “eyeball distribution” to simulate

Simulate data from the beta-binomial distribution in SAS

November 20, 2017
By
Simulate data from the beta-binomial distribution in SAS

This article shows how to simulate beta-binomial data in SAS and how to compute the density function (PDF). The beta-binomial distribution is a discrete compound distribution. The "binomial" part of the name means that the discrete random variable X follows a binomial distribution with parameters N (number of trials) and

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Simulate data from the beta-binomial distribution in SAS

Simulate correlations by using the Wishart distribution

October 11, 2017
By
Simulate correlations by using the Wishart distribution

The article "Fisher's transformation of the correlation coefficient" featured a Monte Carlo simulation that generated sample correlations from bivariate normal data. The simulation used three steps: Simulate B samples of size N from a bivariate normal distribution with correlation ρ. Use PROC CORR to compute the sample correlation matrix for

The post Read more »

Tags: ,
Posted in SAS | Comments Off on Simulate correlations by using the Wishart distribution

Data-driven simulation

September 27, 2017
By
Data-driven simulation

In a large simulation study, it can be convenient to have a "control file" that contains the parameters for the study. My recent article about how to simulate multivariate normal clusters demonstrates a simple example of this technique. The simulation in that article uses an input data set that contains

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on Data-driven 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.