rescalemarg: Re-scale marginal distribution to compute the distribution of...

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/SE-utils.R

Description

This function takes a marginal distribution (represetend by a 2-column matrix) and computes the marginal distribution of w*x.

Usage

1
rescalemarg(xx, w)

Arguments

xx

2-column matrix with x and y-values.

w

Weight to re-scale the y-values.

Details

This function simply re-scales

Value

A 2-column matrix with the new values of w*x and their associated probability densities. This is also an object of classes inla.marginal.

Author(s)

Virgilio G<f3>mez-Rubio <virgilio.gomez@uclm.es>

References

INLA

See Also

inla.tmarginal

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
if(requireNamespace("INLA", quietly = TRUE)) {
require(INLA)
x<-seq(-3,3, by=.01)
xx<-cbind(x, dnorm(x))

xx2<-rescalemarg(xx, 3)

plot(xx, type="l", xlim=c(-9,9))
lines(xx2, col="red")
}

INLABMA documentation built on May 2, 2019, 4:42 p.m.

Related to rescalemarg in INLABMA...