- Thread starter mohsenhs82
- Start date
- Tags censored qq plot quantile r sas

Thanks for your reply.

Please let me briefly explain the situation. We would like to model the traffic data and we collected the data from some devices. They were collected every 60 seconds (but not very accurately) and we distributed them by using uniform dist in 60 seconds randomly. We are interested to know what distribution model the data better.

Among all the distributions, lnorm fitted better and has the lowest AIC, BIC, but I can see a small tail both at the start and at the end (Values less than 2 seconds and values greater than 1000 sec). Hence, I would like to do the left censoring for val<2 and right for val>1000) and plot the QQ.

Looking forward to hearing from you.

Regards

M

require(gglot2)

library(fitdistrplus)

library(MASS)

require(FAdist)

require(EnvStats)

df= read.csv ("data.csv")

z=rep(df$timenum,time=df$count)

fitln <- fitdist(z, "lnorm")

...

qqPlotCensored(z,as.logical(arr),distribution = "lnorm", censoring.side = "left",add.line = TRUE, main = "")

Unfortunately qqPlotCensored can do the fitting and QQ for only right or left and it does not have the ability to do it simultaneously. I am looking for a function or package to plot qq for both left and right at the same time.

The purpose is to find the best distribution that model the data. I am not trying to truncate the data. I want to do censoring which I think is more reasonable. As you mentioned, I think I need a qq plot with Cox-Snell residual which follows the normative distribution as a tool for visualization.

Regards,