如何解决搜索带有R的估计量时出错
我的代码:
Amazon S3 allows arbitrary Unicode characters in your Metadata values.
To avoid issues around the presentation of these Metadata values,you should conform to using US-ASCII characters when using REST and UTF-8 when using SOAP or browser-based uploads via POST.
通过在R中执行此操作,我得到了这样的错误:
pweibull中的错误(duom1 $ Int_pab [1],形状= par [2],比例尺= par [1],lower.tail = TRUE):
数学函数的非数字参数。
有人能让我知道怎么了吗?另外,这是此任务中使用的数据集:
和dput(duom1)的输出:
#Task 1.4 Find the ML estimators of nu and eta from the grouped data.
library("xlsx")
duom1<-dataset1
duom1
k=11
library(maxLik)
ln_l3 <- function(par) {
eta <- par[1]
nu <- par[2]
reziai=k-1
f=duom1$U_i[1]*log(pweibull(duom1$Int_pab[1],shape=par[2],scale = par[1],lower.tail = TRUE))+
duom1$U_i[k]*log(1-pweibull(duom1$Int_pr[k],lower.tail = TRUE))+
sum(duom1$U_i[2:reziai]*log(
pweibull(duom1$Int_pab[2:reziai],lower.tail = TRUE)-
pweibull(duom1$Int_pr[2:reziai],lower.tail = TRUE)) )
return(f)
}
mle <- maxLik(logLik = ln_l3,start = c(650,2))
coef(mle)
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。