```
# NOT RUN {
### Create simple dataset
dat <- PlantGrowth[1:20,];
### Remove third level from group factor
dat$group <- factor(dat$group);
### Examine normality
normalityAssessment(dat$weight);
### Compute mean difference and show it
meanDiff(dat$weight ~ dat$group, plot=TRUE);
### Show the t-test
didacticPlot(meanDiff(dat$weight ~ dat$group)$t,
statistic='t',
df1=meanDiff(dat$weight ~ dat$group)$df);
### Load data from simulated dataset testRetestSimData (which
### satisfies essential tau-equivalence).
data(testRetestSimData);
### Select some items in the first measurement
exampleData <- testRetestSimData[2:6];
# }
# NOT RUN {
### Show reliabilities
scaleStructure(dat=exampleData, ci=FALSE,
omega.psych=FALSE, poly=FALSE);
# }
# NOT RUN {
### Show item distributions and means
meansDiamondPlot(exampleData);
### Create a dichotomous variable
exampleData$group <- cut(exampleData$t0_item2, 2);
### Show a dlvPlot
dlvPlot(exampleData, x="group", y="t0_item1");
### show a dlvPlot with less participants, showing the confidence
### interval and standard error bars better
dlvPlot(exampleData[1:30, ], x="group", y="t0_item1");
# }
```

Run the code above in your browser using DataLab