rm(list=ls(all=TRUE))
data <- read.csv("con.csv", header=TRUE, sep = ",")
x <- data$X0
n = length(x); T1 <- 1
f <- function(a,b) {
L <- (n*log(a))+(n*a*log(T1))+(n*a*log(b))-(n*log((T1^a)-(b^a)))- ((a+1)*sum(log(b+x)))
return(-L)
}
ML <- nlm(f, c(0.01,0.17))
导致 f(x, ...) 中的错误:缺少参数“x”,没有默认值帮助我找出错误和解决方案