driving.Rdata
file.head( driving )
to look at the first few observationslsr
, car
load( "~/Work/Research/Rbook/workshop_dsto/datasets/driving.Rdata")
head( driving )
library(lsr)
library(car)
lm()
to fit a regression model with the RT at time 1 as the outcome variable, including age and errors at time 1 as predictors. Save the results to a variable called mod.1
summary()
to run the hypothesis tests etc associated with mod.1
standardCoefs()
to extract standardised regression coefficientsplot()
to draw the standard regression diagnostic plots associated with mod.1
aov()
to fit an ANOVA model with number of errors at time 1 as the outcome, and with groups defined by distractor type. Save the results to a variable called mod.2
.Anova()
function [not anova()
] to produce the ANOVA tableetaSquared()
to estimate the effect sizeTukeyHSD()
to run posthoc testsbars()
to plot the group means and confidence intervals, since that’s always useful when making sense of the results!aov()
to fit an ANOVA model that has number of errors at time 1 as the outcome, and with groups defined by distractor type and by peak hour. Include interaction terms in the model. Save the results to a variable called mod.3
.Anova()
to produce the ANOVA tableetaSquared()
to estimate the effect sizeTukeyHSD()
to run posthoc testsbars()
to plot the group means and confidence intervals, since that’s always useful when making sense of the results!lm()
to fit a stage one model that has errors at time 1 as the outcome, and age and gender as predictors (save it as mod.4a
). Then fit the stage 2 model that also includes distractor as an additional predictor (mod.4b
).anova()
to run the hierarchical regression