R/ttest.ppls.R

Defines functions ttest.ppls

Documented in ttest.ppls

ttest.ppls<-function(ppls.object,ncomp=ppls.object$ncomp.opt,index.lambda=ppls.object$index.lambda){
     jack.object=jack.ppls(ppls.object,ncomp=ncomp,index.lambda=index.lambda)

     my.mean<-coef(jack.object)
     my.sd<-sqrt(diag(vcov(jack.object)))
     my.df=jack.object$k-1
     tvalues <- my.mean/my.sd
    pvalues <- 2 * pt(abs(tvalues), df = my.df, lower.tail = FALSE)
             return(list(pvalues=pvalues,tvalues=tvalues))

}

Try the ppls package in your browser

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

ppls documentation built on July 21, 2018, 5:02 p.m.