Generate a random vector of educational attainment level.
1 2 3 4 5 6 7
education(n, x = c("No Schooling Completed", "Nursery School to 8th Grade", "9th Grade to 12th Grade, No Diploma", "Regular High School Diploma", "GED or Alternative Credential", "Some College, Less than 1 Year", "Some College, 1 or More Years, No Degree", "Associate's Degree", "Bachelor's Degree", "Master's Degree", "Professional School Degree", "Doctorate Degree"), prob = c(0.013, 0.05, 0.085, 0.246, 0.039, 0.064, 0.15, 0.075, 0.176, 0.072, 0.019, 0.012), name = "Education")
The number elements to generate. This can be globally set within
the environment of
A vector of elements to chose from.
A vector of probabilities to chose from.
The name to assign to the output vector's
The educational attainments and probabilities used match approximate U.S. educational attainment make-up (http://www.census.gov):
|No Schooling Completed||1.3 %|
|Nursery School to 8th Grade||5 %|
|9th Grade to 12th Grade, No Diploma||8.5 %|
|Regular High School Diploma||24.6 %|
|GED or Alternative Credential||3.9 %|
|Some College, Less than 1 Year||6.4 %|
|Some College, 1 or More Years, No Degree||15 %|
|Associate's Degree||7.5 %|
|Bachelor's Degree||17.6 %|
|Master's Degree||7.2 %|
|Professional School Degree||1.9 %|
|Doctorate Degree||1.2 %|
Returns a random vector of educational attainment level elements.
Other variable functions:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.