===== Robust methods =====
==== A real data set ====
There are four occasion of data in this data set.
* {{:lab:projects:13applying_student_t_distribution_on_observed_variables_or_latent_variables:nlsy.txt|NLSY data}}
==== WinBUGS codes ====
* [[t-distribution on observed data]]
* [[t-distribution on random effects]]
* [[normal data model bugs codes]]
* [[SAS codes for DIC analysis]]
* [[OpenBUGS script for saving DIC]]
* Get DIC from the output
proc.coda<-function(stem,N, I){
res<-NULL
for (i in 1001:2000){
codafile<-paste('../', stem,I,"/",stem,"CODAN",N,"I",i,"dic.txt",sep='')
file.res<-paste(stem,'-', I,'-',N,'DIC.txt', sep='')
if (file.exists(codafile)){
DIC<-suppressWarnings(readLines(codafile))
DIC<-DIC[substr(DIC,1,1)=="y"]
cat(c(DIC, i), file=file.res, append=T)
cat('\n', file=file.res, append=T)
}
}
}
#Check http://crc.nd.edu/wiki for login problems
#Contact crcsupport@nd.edu if further problems
if ( -r /opt/crc/Modules/current/init/csh ) then
source /opt/crc/Modules/current/init/csh
endif
#Additional aliases
#Additional modules
#!/bin/csh
#$ -M xtong@nd.edu
#$ -m abe
#$ -r y
module load sas
sas runsim.sas