Learn R Programming

MAMA (version 2.2.1)

T.select: Function to help with selection of threshold for T-statistics

Description

Function calculates quantiles of T-statistics to help with selection of threshold for it as part of MAP-Matches method.

Usage

T.select(stat, fig = TRUE)

Arguments

stat
Vector of T-statistics
fig
If TRUE a plot of quantiles and sequence from 0.97 to 0.98 is provided.

Value

A vector of T-statistics quantiles.

Examples

Run this code
## The function is currently defined as
function(stat,fig=TRUE)
{
 quan <- quantile(abs(stat),seq(0.97,0.98,.0001))
 x <- seq(0.97,0.98,1e-04)
if (fig) {
 plot(x,quan,type="b",xlab="percent",ylab="t")
 z <- lm(quan ~ x)
 abline(z,col="red")
 points(0.9787,quan["97.87%"],pch=19,cex=1.5,col="red")
 }
return(quan)
  }

Run the code above in your browser using DataLab