getCI {sojourner} | R Documentation |
given a dcoef result, return Confidence Interval information(mean, bounds, std err) for diffusion coefficient and the proportions of each components.
getCI(bootstrap.result,confidence=0.95,output=FALSE)
confidence |
the level of confidence that is used to calculate the confidence interval. |
bootstrap.result |
diffusion coefficient calculated from Dcoef(). |
output |
Logical indicate if output file should be generated. |
Supplied with a bootstrap output, it calculates the confidence range. The t-distribution/critical-t was used to calculate the Confidence Interval.
list of items, each of which will contain for each distribution component:
Mean estimated from sample
Lower bound of the confidence interval
Upper bound of the confidence interval
Std. Error for given data
# compare folders folder1=system.file('extdata','SWR1',package='sojourner') folder2=system.file('extdata','HTZ1',package='sojourner') trackll=compareFolder(folders=c(folder1,folder2), input=3) #get msd MSD=msd(trackll=trackll) #run Dcoef() dcoef=Dcoef(MSD,dt=6,plot=TRUE,output=FALSE) #fit the dcoef result normalFit=fitNormDistr(dcoef) # perform bootstrapping for this dcoef result d.boot = bootstrap(normalFit, n.reps=100) # get confidence intervals for this dcoef result which contains data from # two different folders a=getCI(d.boot) # to manually set confidence to 80% b=getCI(d.boot, confidence=0.8, output=FALSE)