JuliaStats / StatsBase.jl

Basic statistics for Julia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to get critical value with native julia code?

phpsmarter opened this issue · comments

Can not find native method to get critical value of t-test

At now just use R language function

  function get_criticalvalue(df,alpha=0.05)
       @rput df alpha
        R"""
	    res<-qt(p=alpha/2, df=df, lower.tail=FALSE)
        """
        return @rget  res
  end

Hi @phpsmarter, please direct usage questions to the Julia Discourse; we use the issue tracker for bug reports and feature requests.

In this case, note the R function you're calling: qt, which retrieves quantiles from the t-distribution. In Julia, distributions are provided by the Distributions package, which extends quantile from Statistics to provide this functionality.