Posts Tagged ‘ simulation ’

Monte Carlo simulation for contingency tables in SAS

October 28, 2015
By
Monte Carlo simulation for contingency tables in SAS

The FREQ procedure in SAS supports computing exact p-values for many statistical tests. For small and mid-sized problems, the procedure runs very quickly. However, even though PROC FREQ uses efficient methods to avoid unnecessary computations, the computational time required by exact tests can be prohibitively expensive for large sample sizes.

The post Read more »

Tags: ,
Posted in SAS | Comments Off on Monte Carlo simulation for contingency tables in SAS

Simulate contingency tables with fixed row and column sums in SAS

October 21, 2015
By
Simulate contingency tables with fixed row and column sums in SAS

How do you simulate a contingency table that has a specified row and column sum? Last week I showed how to simulate a random 2 x 2 contingency table when the marginal frequencies are specified. This article generalizes to random r x c frequency tables (also called cross-tabulations) that have the same marginal row

The post Read more »

Tags: ,
Posted in SAS | Comments Off on Simulate contingency tables with fixed row and column sums in SAS

Models and simulation for 2×2 contingency tables

October 14, 2015
By
Models and simulation for 2×2 contingency tables

When modeling and simulating data, it is important to be able to articulate the real-life statistical process that generates the data. Suppose a friend says to you, "I want to simulate two random correlated variables, X and Y." Usually this means that he wants data generated from a multivariate distribution,

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Models and simulation for 2×2 contingency tables

How to generate random integers in SAS

October 5, 2015
By
How to generate random integers in SAS

I was recently talking with some SAS customers and someone started talking about generating random numbers. I was asked "Why can't SAS create an easy way to generate random numbers? Excel has a simple way to generate random numbers between 1 and 100, and I use it all the time."

The post Read more »

Tags: ,
Posted in SAS | Comments Off on How to generate random integers in SAS

Balls and urns Part 2: Multi-colored balls

October 2, 2015
By
Balls and urns Part 2: Multi-colored balls

In a previous post I described how to simulate random samples from an urn that contains colored balls. The previous article described the case where the balls can be either of two colors. In that csae, all the distributions are univariate. In this article I examine the case where the

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on Balls and urns Part 2: Multi-colored balls

Balls and urns: Discrete probability functions in SAS

September 30, 2015
By
Balls and urns: Discrete probability functions in SAS

If not for probability theory, urns would appear only in funeral homes and anthologies of British poetry. But in probability and statistics, urns are ever present and contain colored balls. The removal and inspection of colored balls from an urn is a classic way to demonstrate probability, sampling, variation, and

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Balls and urns: Discrete probability functions in SAS

A simple way to construct a large correlation matrix

September 23, 2015
By
A simple way to construct a large correlation matrix

Occasionally a SAS statistical programmer will ask me, "How can I construct a large correlation matrix?" Often they are simulating data with SAS or developing a matrix algorithm that involves a correlation matrix. Typically they want a correlation matrix that is too large to input by hand, such as a

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on A simple way to construct a large correlation matrix

Monitor convergence during simulation studies in SAS

August 26, 2015
By
Monitor convergence during simulation studies in SAS

Ugh! Your favorite regression procedure just printed a warning to the SAS log. Something is wrong, and your attempt to fit a model to the data has not succeeded. A typical message is "WARNING: The validity of the model fit is questionable," perhaps followed by some additional diagnostic messages about

The post Read more »

Tags: ,
Posted in SAS | Comments Off on Monitor convergence during simulation studies in SAS

Proc-x is looking for 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



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.

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.