To run tps.R, you can invoke R then at the prompt ">" do > source("tpsr.R") and it should run tpsr.R and give you result.ps, result.txt and gcv.ps to get out of R do q(). to do a replicate, reset "set.seed" to change the noise standard deviation change the default multiplier .07 every where it occurs. We strongly encourage you to take a look at the R code and run it line by line.