getCI {sojourner} | R Documentation

## getCI

### Description

given a dcoef result, return Confidence Interval information(mean, bounds, std err) for diffusion coefficient and the proportions of each components.

### Usage

    getCI(bootstrap.result,confidence=0.95,output=FALSE)

### Arguments

`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.

### Details

Supplied with a bootstrap output, it calculates the confidence range. The t-distribution/critical-t was used to calculate the Confidence Interval.

### Value

list of items, each of which will contain for each distribution component:

Estimate

  Mean estimated from sample

CI lower

  Lower bound of the confidence interval

CI upper

  Upper bound of the confidence interval

Std. Error

  Std. Error for given data

### Examples

    # 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)

[Package sojourner version 1.1.1 Index]