Description Usage Arguments Details Value References See Also Examples
Generate a random vector of educational attainment level.
1 2 3 4 5 6 7 8 9 10 11 12 | 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"
)
|
n |
The number elements to generate. This can be globally set within
the environment of |
x |
A vector of elements to chose from. |
prob |
A vector of probabilities to chose from. |
name |
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):
Highest Attainment | Percent |
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.
http://www.census.gov
Other variable functions:
age()
,
animal()
,
answer()
,
area()
,
car()
,
children()
,
coin()
,
color
,
date_stamp()
,
death()
,
dice()
,
dna()
,
dob()
,
dummy()
,
employment()
,
eye()
,
grade_level()
,
grade()
,
group()
,
hair()
,
height()
,
income()
,
internet_browser()
,
iq()
,
language
,
level()
,
likert()
,
lorem_ipsum()
,
marital()
,
military()
,
month()
,
name
,
normal()
,
political()
,
race()
,
religion()
,
sat()
,
sentence()
,
sex_inclusive()
,
sex()
,
smokes()
,
speed()
,
state()
,
string()
,
upper()
,
valid()
,
year()
,
zip_code()
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.