R中相型密度的对数变换

R中相型密度的对数变换,r,logging,density-plot,R,Logging,Density Plot,我正在研究相类型分布,但我似乎无法正确地得到密度的对数变换 library(matrixdist) data <- rexp(500,1.5) paretoData <- exp(data)-1 hist1 <- hist(paretoData,breaks=30,probability =T) y <- seq(0.01,116,by=0.1) ph5 <- ph(structure="general",dimension=5) fit5 &l

我正在研究相类型分布,但我似乎无法正确地得到密度的对数变换

library(matrixdist)
data <- rexp(500,1.5)
paretoData <- exp(data)-1
hist1 <- hist(paretoData,breaks=30,probability =T)
y <- seq(0.01,116,by=0.1)
ph5 <- ph(structure="general",dimension=5)
fit5 <- fit(ph5,paretoData,stepsEM=1)
fit5 <- fit(fit5,paretoData,stepsEM=10000,every=5)
lines(y, dens(fit5, y)$dens, col = "red")
库(矩阵列表)
数据将
行(log(y),dens(fit5,log(y))$dens,col=“red”)
工作吗?(我没有安装
MatrixList
软件包,所以我自己也没有试过)。另一种选择是在直方图中使用对数比例,如下所示:
hist1 <- hist(log(paretoData),breaks=30,probability =T)