Advertisement

Generating Data

  • Robert A Muenchen
Chapter
Part of the Statistics and Computing book series (SCO)

Generating your own data is helpful in several ways. When you are designing an experiment, the levels of the experimental variables usually follow simple repetitive patterns. You can generate those and then add the measured outcome values to it manually. With such a nice neat dataset to start with, it is tempting to collect data in that order. However, it is important to collect it in random order whenever possible so that factors such as human fatigue or machine wear do not bias the results of your study.

Some of our generating data examples use R's random number generator. It will give a different result each time you use it unless you use the set.seedfunction before each function that generates random numbers.

Our workshop variable is an easy factor to generate. It repeats the pattern 1,2,1,2…

Generated data is also helpful for learning R and for submitting questions to the r-help e-mail list. That way you can send a working example of your problem without having to send a large or...

Keywords

Random Number Generator Gender Variable Sample Function Random Number Seed Column Width 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Springer Science+Business Media, LLC 2009

Authors and Affiliations

  • Robert A Muenchen
    • 1
  1. 1.University of TennessceKnoxvilleUNA

Personalised recommendations