将 Perl 转换为 R stats question f probability question

converting Perl to R stats question f probability question

我正在尝试将 Perl 代码转换为 R 我认为 qf 是我需要使用的函数,但是在 PERL fprob=.42870 和 qf=NAN 以下的情​​况下,关于如何使它工作的任何想法。

R
      fprob<-qf(1.36111111111361, df1=72, df2=4) #=NAN
PERL
      my $fprob=Statistics::Distributions::fprob (72,4,1.36111111111361); #=0.42870

Definition:
$fprob=Statistics::Distributions::fprob (3,5,.625);
print "upper probability of the F distribution (3 degrees of freedom "
     ."in numerator, 5 degrees of freedom in denominator, F = 6.25): "
     ."Q = 1-G = $fprob\n";

fprob是分布的上概率,qf是分位数函数。的是不一样的。 尝试

> 1-pf(1.36111111111361, df1=72, df2=4)
[1] 0.4286957

相关文档:

‘df’ gives the density, ‘pf’ gives the distribution function ‘qf’ gives the quantile function, and ‘rf’ generates random deviates.