Description Usage Arguments Details Value See Also Examples

These are functions to help in the creation and use of continuous effectiveness distributions.

1 2 3 4 5 6 7 | ```
cap(x, xmin = 1e-06, xmax = 1 - xmin)
effContMean(qfun, abs.tol = 1e-06, subdivisions = 500)
effContVar(qfun, mu, abs.tol = 1e-06, subdivisions = 500)
effContTrunc(dfun, pfun, qfun, ...)
``` |

`x` |
a sample of effectiveness scores. |

`xmin` |
lowest value to cap scores. |

`xmax` |
highest value to cap scores. |

`qfun` |
a quantile function. |

`abs.tol` |
absolute accuracy requested, passed to |

`subdivisions` |
the maximum number of subintervals, passed to |

`mu` |
the expected value of the distribution (see |

`dfun` |
a density function. |

`pfun` |
a distribution function. |

`...` |
additional arguments passed to other functions, if any. |

`cap`

caps (censor) a variable from below and above.

`effContMean`

computes the expected value of a distribution by numerical integration of the
given quantile function.

`effContVar`

computes the variance of a distribution by numerical integration of the given
quantile function.

`effContTrun`

computes the density, distribution and quantile functions of the distribution
resulting from truncating a given distribution between 0 and 1.

`cap`

: the original vector, but censored.

`effContMean`

: the estimate of the expected value.

`effContVar`

: the estimate of the variance.

`effContTrunc`

: a list with components:

`td` | the truncated density function. |

`tp` | the truncated distribution function. |

`tq` | the truncated quantile function. |

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
cap(c(0, .5, 1))
effContMean(function(p) qnorm(p, mean = 4))
effContMean(function(p) qbeta(p, 1, 2))
effContVar(function(p) qnorm(p, mean = 2, sd = 4), 2)
effContVar(function(p) qbeta(p, 1, 2), 1/3)
tr <- effContTrunc(dnorm, pnorm, qnorm, mean = .8, sd = .3)
x01 <- seq(0, 1, .01)
plot(x01, tr$d(x01), type = "l")
plot(x01, tr$p(x01), type = "l")
plot(x01, tr$q(x01), type = "l")
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.