Skip to content

Regression Tolerance Intervals - Dr. Young's Code

3 messages · Muhuri, Pradip (SAMHSA/CBHSQ), Uwe Ligges

1 day later
#
On 08.06.2013 05:17, Muhuri, Pradip (SAMHSA/CBHSQ) wrote:
Come on, start using your brain and replace new.xlndur by new.x?
So replace x and y appropriately?

Best,
Uwe Ligges
#
Uwe and Dennis - Thank you so much for your comments, tips and advice. The following reproducible code has worked and given me the desired results. 

Pradip


####################### Revised Code #################


setwd ("C:/RAPP")
require ("tolerance")
set.seed (100);x <- runif (200,0,10); y <- 20+5*x + rnorm (100,0,20); data.frame (cbind (x,y))
out <- regtol.int (reg=lm(y~x), new.x=cbind (c(3,6,12)), side=2, alpha=.05, P=.90);
plottol(out, x=cbind(1,x), y=y, side="two", x.lab="X", y.lab="Y" )