小编rwi*_*000的帖子

无法获得 partykit 包的 mob 函数来进行单变量 MLE 拟合

我无法使用 partykit 包的 mob 函数来进行单变量 MLE 拟合。

# Trying to convert vignette example here https://cran.r-project.org/web/packages/partykit/vignettes/mob.pdf on page 7 to do univariate MLE gamma fits.  
data("PimaIndiansDiabetes", package = "mlbench")    
library("partykit")     
library("fitdistrplus")    


# Generating some fake data to replace the example data.
op <- options(digits = 3)
set.seed(123)    
x <- rgamma(nrow(PimaIndiansDiabetes), shape = 5, rate = 0.1)
PimaIndiansDiabetes$diabetes<-x
PimaIndiansDiabetes$glucose<-x 

#Hopefully this change to the formula means fit a gamma to just the diabetes vector of values!
pid_formula <- diabetes  ~ 1  | …
Run Code Online (Sandbox Code Playgroud)

oop r party

2
推荐指数
1
解决办法
505
查看次数

标签 统计

oop ×1

party ×1

r ×1