相似文件
换一批
经管之家送您一份
应届毕业生专属福利!
求职就业群
感谢您参与论坛问题回答
经管之家送您两个论坛币!
+2 论坛币
- x<c(0.06,2.8441,540,1.1,4.974,509.8,66,800.14,3670,762.2336,0.05,2880,2.4514,1235.921,0.57,0.2,270,159.2482,3.6,769,4.65,280,0.1876,0.3,0.07,2200,0.0695,3970,280,138,1050.952,287.2281,5.7128,0.77,2.964,10.2,3.4849,2.7415,1000,1.3796,13.6403,9.3983,322.371,0.8,0.89,110.3466,2,0.38,10,136.0477,0.4,348.8425,148,52,117,240,1350.358)
- y=log10(x)
- # location and scale based on the y
- x.n <- length(x)
- x.location <- mean(x)
- x.var <- (x.n - 1)/x.n*var(x)
- x.scale <- sqrt(3*x.var)/pi
- # load the stats4 package
- library(stats4)
- # function to calculate negative log-likelihood
- ll.logis <- function(location=x.location, scale=x.scale){
- -sum(dlogis(x, location, scale, log = TRUE))
- }
- # fitting logistic distribution using mle function
- fit.mle <- mle(ll.logis, method="Nelder-Mead")
复制代码
扫码加我 拉你入群
请注明:姓名-公司-职位
以便审核进群资格,未注明则拒绝
|