# Posts Tagged ‘ simulation ’

## Data unavailable? Use the "eyeball distribution" to simulate

January 15, 2018
By

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 Data unavailable? Use the "eyeball distribution" to simulate appeared first on The DO Loop.

## random wake

December 26, 2017
By

Just too often on X validated, one sees questions displaying a complete ignorance of the basics that makes one purposelessly wonder what is the point of trying to implement advanced methods when missing the necessary background. And just as often, I reacted to the question by wondering out loud about this… In the current case, […]

## Simulate data from the beta-binomial distribution in SAS

November 20, 2017
By

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 Simulate data from the beta-binomial distribution in SAS appeared first on The DO Loop.

## Simulate correlations by using the Wishart distribution

October 11, 2017
By

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 Simulate correlations by using the Wishart distribution appeared first on The DO Loop.

## How Good is That Random Number Generator?

September 28, 2017
By

Recently, I saw a reference to an interesting piece from 2013 by Peter Grogono, a computer scientist now retired from Concordia University. It's to do with checking the "quality" of a (pseudo-) random number generator.Specifically, Peter discusses what...

## How Good is That Random Number Generator?

September 28, 2017
By

Recently, I saw a reference to an interesting piece from 2013 by Peter Grogono, a computer scientist now retired from Concordia University. It's to do with checking the "quality" of a (pseudo-) random number generator.Specifically, Peter discusses what...

## Data-driven simulation

September 27, 2017
By

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 Data-driven simulation appeared first on The DO Loop.

## Simulate multivariate normal data in SAS by using PROC SIMNORMAL

September 25, 2017
By

My article about Fisher's transformation of the Pearson correlation contained a simulation. The simulation uses the RANDNORMAL function in SAS/IML software to simulate multivariate normal data. If you are a SAS programmer who does not have access to SAS/IML software, you can use the SIMNORMAL procedure in SAS/STAT software to [...] The post Simulate multivariate normal data in SAS by using PROC SIMNORMAL appeared first on The DO Loop.

## Simulate multivariate clusters in SAS

September 13, 2017
By

This article shows how to simulate data from a mixture of multivariate normal distributions, which is also called a Gaussian mixture. You can use this simulation to generate clustered data. The adjacent graph shows three clusters, each simulated from a four-dimensional normal distribution. Each cluster has its own within-cluster covariance, [...] The post Simulate multivariate clusters in SAS appeared first on The DO Loop.

## Random segments and broken sticks

July 26, 2017
By

A classical problem in elementary probability asks for the expected lengths of line segments that result from randomly selecting k points along a segment of unit length. It is both fun and instructive to simulate such problems. This article uses simulation in the SAS/IML language to estimate solutions to the [...] The post Random segments and broken sticks appeared first on The DO Loop.