In example 7.20, we showed how to simulate categorical data. But we might anticipate needing to do that frequently. If a SAS function weren’t built in and an equivalent R function not available in a package, we could build them from scratch.SASThe SAS code is particularly tortured, since we must parse the parameter string to extract the table probabilities. We do this with the count and find (

*Related*

To

**leave a comment** for the author, please follow the link and comment on their blog:

** SAS and R**.

R-bloggers.com offers

**daily e-mail updates** about

R news and

tutorials on topics such as:

Data science,

Big Data, R jobs, visualization (

ggplot2,

Boxplots,

maps,

animation), programming (

RStudio,

Sweave,

LaTeX,

SQL,

Eclipse,

git,

hadoop,

Web Scraping) statistics (

regression,

PCA,

time series,

trading) and more...

If you got this far, why not

__subscribe for updates__ from the site? Choose your flavor:

e-mail,

twitter,

RSS, or

facebook...

**Tags:** multinomial observations, pseudo-random numbers, simulate data, simulation studies