f与fitdistr的分布
RStudio版本0.98.1049 质量版本7.3-33f与fitdistr的分布,r,distribution,R,Distribution,RStudio版本0.98.1049 质量版本7.3-33 x <- rf(1000, 31, 9) fitdistr(x, 'f', start=list(31, 9)) Error in as.function.default(c(value, if (is.null(bd) || is.list(bd)) list(bd) else bd), : use of NULL environment is defunct xstart参数需要一个命名列表: set.seed(42)
x <- rf(1000, 31, 9)
fitdistr(x, 'f', start=list(31, 9))
Error in as.function.default(c(value, if (is.null(bd) || is.list(bd)) list(bd) else bd), :
use of NULL environment is defunct
xstart
参数需要一个命名列表:
set.seed(42)
x <- rf(1000, 31, 9)
library(MASS)
fitdistr(x, 'f', start=list(31, 9))
#Error in densfun(x, parm, ...) :
# argument "df2" is missing, with no default
fitdistr(x, 'f', start=list(df1=31, df2=9))
# df1 df2
# 22.1259170 10.6960522
#( 3.3765675) ( 0.8678625)
set.seed(42)
RStudio版本在这里几乎不相关。R版本可能是。还要确保没有全局df
变量。。。我被这个咬了。