View source: R/Scale_Logistic.R
1 | datum.eval(beta.pos, data.idx)
|
beta.pos |
|
data.idx |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (beta.pos, data.idx)
{
datum.call <- datum(data.idx)
datum.z <- exp(sum(datum.call$x * beta.pos))
log.pi <- datum.call$x * beta.pos * datum.call$y - log(1 +
datum.z)
grad.log.pi <- diag(n.sigma) * datum.call$x * (datum.call$y -
datum.z/(1 + datum.z))
lap.log.pi <- -(diag(n.sigma) * datum.call$x)^2 * datum.z/(1 +
datum.z)^2
list(log.pi = log.pi, grad.log.pi = grad.log.pi, lap.log.pi = lap.log.pi)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.