R/TR.R

Defines functions TR

Documented in TR

TR <-
function(object, x1, a1=NULL, x2=NULL, stage=1){
	if (class(object)=="PAL" || class(object)=="SAS"){
		if (stage==1)
			return (as.vector(((cbind(1, x1) %*% object$beta1.est) >0)+0))
		else
			return (as.vector(((cbind(1, x1, a1, x2) %*% object$beta2.est) >0)+0))
	}
	else {
		stop("Object must be fitted by PAL or SAS!")
	}
}

Try the ITRSelect package in your browser

Any scripts or data that you put into this service are public.

ITRSelect documentation built on May 1, 2019, 10:56 p.m.