根据截断的对数正态数据估算非截断的对数正态分布的期望值

时间:2019-03-26 18:56:04

标签: r distribution

我有以下数据和以下R代码:

library(fitdistrplus)
library(truncdist)


dtruncated_log_normal <- function(x, meanlog, sdlog) 
  dtrunc(x, "lnorm", a=0, b=10, meanlog=meanlog, sdlog=sdlog)
ptruncated_log_normal <- function(x, meanlog, sdlog) 
  ptrunc(x, "lnorm", a=0, b=10, meanlog=meanlog, sdlog=sdlog)



x<-c(4,0,19,11,2,32,10,0,3,9,10,1,2,10,4,14,6,1,8,16,15,7,2,1,15,10,4,8,7,0,13,0,14,29,23,9,6,9,18,8,18,8,0,33,9,0,1,4,11,
  4,0,3,1,10,8,3,5,1,6,44,5,54,8,1,15,5,5,18,14,3,2,6,0,8,5,17,12,13,8,27,2,1,18,11,31,0,16,4,18,36,11,10,20,18,4,7,4,32)

x<-x+0.5

x1<-x[x<=10]

fitdist(x1, "truncated_log_normal", start = list(meanlog=10, sdlog=10))

我得到以下结果:

Fitting of the distribution ' truncated_log_normal ' by maximum likelihood 
Parameters:
        estimate Std. Error
meanlog 4.324936  3.2990002
sdlog   2.144385  0.9129459

我想这些估计是截断分布的均值和标准偏差的估计。

但是,我想估计相关的截断分布的非截断分布的平均值。

我该怎么做?非常感谢。

0 个答案:

没有答案