1/132
Looks like no tags are added yet.
Object
What stores information in R?
Function
What is a set of instructions that runs a command called?
Argument
What is an input given to a function called?
Package
What is an add-on set of extra R functions called?
install.packages()
Which function downloads a package (needed only once)?
library()
Which function loads a package for the current session?
R project
What kind of folder acts as the working home for your files?
here()
Which function builds file paths from the project folder?
Portable and reproducible
Why is it better to use here() than a typed-out file path?
read.csv()
Which function reads a CSV file into a data frame?
Data frame
What is a table of rows and columns called in R?
Variable
What is a measured characteristic that varies called?
$
Which symbol selects a column from a data frame?
x[5]
What code picks the 5th value of x?
NA
What does R use to represent a missing value?
na.rm=T
Which argument tells a function to ignore missing values?
Preservation and incomplete remains
Why is missing data common in archaeology?
#
Which symbol starts a comment in R?
set.seed()
Which function makes random results repeatable?
subset()
Which function keeps only rows meeting a condition?
recode()
Which function renames categories?
|
Which symbol means "or" in R?
&
Which symbol means "and" in R?
ggplot()
Which function starts a plot?
aes()
Which function maps variables to plot axes?
geom_histogram()
Which function draws a histogram?
Histogram
What plot shows the distribution of one variable?
binwidth
Which argument sets the width of each histogram bar?
labs()
Which function sets axis labels and the title?
facet_wrap()
Which function splits a plot into panels by group?
ggsave()
Which function saves a plot to a file?
Reproducible workflow
Why should you save figures with code instead of by hand?
Units and labels
What should you double-check before analysing, since a plot label can be wrong?
Distribution
What is the overall pattern of how a variable's values occur called?
Unimodal
What is a distribution with one peak called?
Symmetric
What is a distribution with the same shape on both sides of the centre called?
Central tendency
Mean, median, and mode are all ways to measure the typical or middle value of a data set. What is the general name for the concept of a typical or middle value?
Dispersion
What is how spread out values are called?
Mean
What is the average value called?
Standard deviation
What measures the typical distance of values from the mean?
Descriptive statistics
What type of statistics summarise the sample?
mean()
Which function calculates the sample mean?
sd()
Which function calculates the sample standard deviation?
Normal distribution
What is the symmetric bell-shaped distribution called?
Gaussian
What is another name for the normal distribution?
Mean and standard deviation
What are the two parameters of a normal distribution?
Parameter
What is a value that defines a model called?
center of the curve
What does the mean control in a normal distribution?
width of the curve
What does the SD control in a normal distribution?
Two numbers describe all the data
Why is the normal distribution so useful?
Probability density
What is the height of the curve called?
dnorm()
Which function gives the probability density at a value?
pnorm()
Which function gives the proportion of data below a value?
rnorm()
Which function generates random numbers from a normal distribution?
About 34.1%
What percent of data falls between the mean and 1 SD above it?
About 84.1%
What percent of data falls below the mean plus 1 SD?
No
Does the percent of data within 1 SD change with different means and SDs?
No, all models are wrong
Does a model ever match real data perfectly?
stat_function()
Which ggplot function overlays a function curve on a plot?
after_stat()
Which ggplot function lets you use a calculated value, such as density, on an axis?
Sampling error
What is the random difference between a sample and its population called?
Chance in who is sampled
What causes sampling error?
Messier, less representative
What do small samples do to a histogram?
Simulation
What is generating fake data from a model called?
See what chance alone produces
Why simulate data?
Still do not match perfectly
How does simulated data compare to the model it came from?
nsim
What name is often used for the number of simulated values?
Imperfect model and sampling error
What are two reasons data differ from a model?
is.na()
Which function returns TRUE where a value is missing?
!
What symbol means "not" in R?
!is.na()
What code returns TRUE where a value is present?
Counts the TRUEs
What does sum() do to TRUE and FALSE values?
sum(!is.na(x))
What code gives the sample size excluding NAs?
x[5] > x
What code tests whether the 5th value of x is greater than every value in x?
sum(value > data)/n * 100
What code calculates a percentile rank?
Percentile rank
What is the percent of data below a given value called?
Z-score
What is the number of SDs a value is from the mean called?
(value minus mean) divided by SD
What is the Z-score formula?
Standardisation
What is converting data to Z-scores called?
scale()
Which function calculates Z-scores?
Z-score of 0
Which Z-score means a value equals the mean?
1
Which Z-score means a value is one SD above the mean?
0
What is the mean of a set of Z-scores?
1
What is the SD of a set of Z-scores?
Compare variables on the same scale
Why use Z-scores?
Standard normal distribution
What is a normal distribution with mean 0 and SD 1 called?
Z-scores are standardised
Why does pnorm(z, 0, 1) give the same result as pnorm(x, mean, sd)?
Population
What is the whole group we want to know about called?
Sample
What is the subset we actually measured called?
Parameter
What is a true population value called?
Statistic
What is a value calculated from a sample called?
Inferential statistics
What type of statistics uses a sample to learn about a population?
Descriptive describes sample, inferential infers population
What is the difference between descriptive and inferential statistics?
Estimate
What is a best guess of a parameter called?
Point estimate
What is a single best guess called?
Interval estimate
What is a range that shows uncertainty called?
Almost never
How often does a sample mean exactly equal the population mean?
Sample mean
In descriptive statistics, what is the best estimate of the population mean?
Standard error
What measures how spread out sample means would be across repeated samples bc of sampling error?
Confidence interval
What is a plausible range for a parameter called?