convert

conversion functions

These are a number of functions to convert statistics and effect size measures from/to each other.

Keywords
utilities
Usage
convert.b.to.t(b, se)
convert.chisq.to.p(chisq, df, lower.tail=FALSE) convert.chisq.to.V(chisq, n, minDim)
convert.cohensf.to.omegasq(cohensf)
convert.cohensfsq.to.omegasq(cohensfsq)
convert.d.to.logodds(d) convert.d.to.r(d, n1 = NULL, n2 = NULL) convert.d.to.t(d, df = NULL, n1 = NULL, n2 = NULL, proportion = 0.5) convert.d.to.variance(d, n1, n2)
convert.etasq.to.cohensf(etasq)
convert.f.to.etasq(f, df1, df2) convert.f.to.omegasq(f, df1, df2) convert.f.to.p(f, df1, df2, lower.tail=FALSE) convert.f.to.d(f, df1, df2 = NULL, n1=NULL, n2=NULL, proportion=.5)
convert.fisherz.to.r(z)
convert.logodds.to.d(logodds) convert.logodds.to.r(logodds)
convert.means.to.d(means, sds, ns = NULL, var.equal = NULL)
convert.ncf.to.omegasq(ncf, N)
convert.omegasq.to.cohensf(omegasq) convert.omegasq.to.cohensfsq(omegasq) convert.omegasq.to.f(omegasq, df1, df2)
convert.or.to.d(or) convert.or.to.r(or)
convert.percentage.to.se(p, n)
convert.r.to.t(r, n) convert.r.to.d(r) convert.r.to.p(r, n) convert.r.to.fisherz(r)
convert.t.to.r(t, n) convert.t.to.d(t, df=NULL, n1=NULL, n2=NULL, proportion=.5) convert.t.to.p(t, df)
Arguments
chisq, cohensf, cohensfsq, d, etasq, f, logodds, means, omegasq, or, p, r, t, z
The value of the relevant statistic or effect size.
ncf
The value of a noncentrality parameter of the F distribution.
n, n1, n2, N, ns
The number of observations that the r or t value is based on, or the number of observations in each of the two groups for an anova, or the total number of participants when specifying a noncentrality parameter.
df, df1, df2
The degrees of freedrom for that statistic (for F, the first one is the numerator (i.e. the effect), and the second one the denominator (i.e. the error term).
proportion
The proportion of participants in each of the two groups in a t-test or anova. This is used to compute the sample size in each group if the group sizes are unknown. Thus, if you only provide df1 and df2 when converting an F value to a Cohen's d value, equal group sizes are assumed.
b
The value of a regression coefficient.
se, sds
The standard error of standard errors of the relevant statistic (e.g. of a regression coefficient) or variables.
minDim
The smallest of the number of columns and the number of rows of the crosstable for which the chisquare is translated to a Cramer's V value.
lower.tail
For the F and chisquare distributions, whether to get the probability of the lower or upper tail.
var.equal
Whether to compute the value of t or Cohen's d assuming equal variances ('yes'), unequal variances ('no'), or whether to test for the difference ('test').
Value

The converted value as a numeric value.

Aliases
  • convert
  • convert.r.to.t
  • convert.t.to.r
  • convert.b.to.t
  • convert.t.to.p
  • convert.f.to.p
  • convert.f.to.d
  • convert.chisq.to.p
  • convert.chisq.to.V
  • convert.d.to.logodds
  • convert.d.to.r
  • convert.d.to.t
  • convert.d.to.variance
  • convert.etasq.to.cohensf
  • convert.f.to.etasq
  • convert.f.to.omegasq
  • convert.fisherz.to.r
  • convert.logodds.to.d
  • convert.logodds.to.r
  • convert.or.to.d
  • convert.or.to.r
  • convert.r.to.d
  • convert.r.to.fisherz
  • convert.r.to.p
  • convert.t.to.d
  • convert.cohensf.to.omegasq
  • convert.cohensfsq.to.omegasq
  • convert.means.to.d
  • convert.ncf.to.omegasq
  • convert.omegasq.to.cohensf
  • convert.omegasq.to.cohensfsq
  • convert.omegasq.to.f
  • convert.percentage.to.se
Examples

convert.t.to.r(t=-6.46, n=200);
convert.r.to.t(r=-.41, n=200);

### Compute some p-values
convert.t.to.p(4.2, 197);
convert.chisq.to.p(5.2, 3);
convert.f.to.p(8.93, 3, 644);

Documentation reproduced from package userfriendlyscience, version 0.5-2, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.