##data(Anxiety)
##age : 0=younger than 65 and 1=65 or older
##gender: 0=Male and 1=Female
##education: 0=some college or higher 1=high school of lower
#runs age DIF on all 29 items (takes about a minute)
age.dif <- lordif(Anxiety[paste("R",1:29,sep="")],Anxiety$age)
#generates plots for DIF items, reference="Younger" & focal="Older"
plotDIF(sample.run,labels=c("Younger","Older"))
montecarlo(age.dif,alpha=0.05,nr=500)
##this takes about 10 minutes on my computer
Run the code above in your browser using DataLab