moodler - Randomized Moodle Quizzes with R

The introduction to moodler is here.

the package moodler is here: moodler.zip

The examples used in the introduction can be sourced into R from examples.R


Routines

The following is a list of my R Moodle routines.

DISCLAIMER: These routines were written by me for me, they have not been made user-friendly, don’t have any comments, (some) use a different format and therefore come with no guarantees! If one sounds like you might be able to use them, just create a bunch of problems and check inside of Moodle.

Updates/Changes

get.moodle.data replaces both getx and getxy

All routines now need a htxt in addition to qtxt and atxt. This is help that will be shown to the students after their first attempt (NOTE not all routines below have been updated)

moodle.table no longer calls r.tbls

getx now works for both numeric and character data without any additional argument

New Additions

fnumber (five number summary), zscore, emprule, percentages, fivenumber.boxplot, simulation, hp.H0Ha, pvalue, power.mean, power.prop


In most cases the name of the routine pretty much says what it does.

The basic routines to create the newquiz.xml file is

genquiz.R (if fun is already in R)

make.xml.R (if not)


There are a couple of routines that are used by others:

qatxt.R - a general routine use create standard questions and answers.

gen.cont.table.data.R generates data for two categorical variables.

moodle.table.R to display data in quiz.
The routine prints a line with — before the table. This is to get some separation between the values. Unfortunately in htnl5 nice ways to do this with cellpadding etc do not work, and there seems to be no way to include a css style file in Moodle??


anova.oneway.R

anova.tukey.R multiple comparison with Tukey’s method

anova.twoway.R with or without interaction

anova.nonpar.R use Kruskal-Wallis test

anova.transform.R use log transform to get normal residuals

barchart.tshirts.R categorical data problem

basic.R.2.R some basic R questions

basic.R.braquet.R quiz for use of [ , ] notation.

bayes.R questions for my ibayes routine

cat.data.table.R fill in the dable for data from a categorical variable, including percentages and totals.

chi.gof.test.R chi-square goodness of fit test

chi.ind.test.R chi-square test of independence

ci.mean.R find confidence interval for mean. If argument type=1 data is provided, if type=2 summary statistics. If type is missing one is chosen randomly.

ci.prop.R find confidence interval for proportion

ci.sim.R Which of the shown confidence intervals is good?

cont.table.R find percentages and marginals in table

correlation.R estimation, testing or interval estimation for correlation.

correlation.transform.R needs log transform first

emprule.R is the empirical rule working here?

fnumber.R Find five number summary

fivenumber.boxplot.R read five number summary off boxplot

gen.cont.table.data.R generate data for some of the categorical data problems

hp.H0Ha.R choose the right null and alternative hypothesis.

hp.mean.R hypothesis test for mean. If argument type=1 data is provided, if type=2 summary statistics. If type is missing one is chosen randomly.

hp.prop.R hypothesis test for proportion

hp.power.R tests the understaning of the concept of power of a test

hp.sim.R students has to decide in a number of cases whether a test made the right decision or committed an error, type I or II

mean.median.sd.R find mean and/or median and/or standard deviation

meanvsmedian student needs to decide whether to use the mean or the median

normal.check.R does data shown in probability plot come from a normal distribution?

normal.guess.R What are the mean and the standard deviation of this normal curve

outliers.R how many outliers ?

pvalue.R use pvalue app to find pvalue and sample size

percentile.R find percentile of data by hand and with R

power.mean.R what is the power of a certain test for the mean?

power.prop.R what is the power of a certain test for a percentage?

regression.bestmodel.R find best model among standard list

regression.findmodel.R find specific model (quadratic, exponential etc.)

regression.multiple.R various questions in multiple regression problems

regression.simple.R various questions in simple linear regression problems

samplesize.mean.R

samplesize.prop.R

simulation.R

zscore.R pick which is better based on zscore