rescalemarg | R Documentation |
This function takes a marginal distribution (represetend by a 2-column matrix) and computes the marginal distribution of w*x.
rescalemarg(xx, w)
xx |
2-column matrix with x and y-values. |
w |
Weight to re-scale the y-values. |
This function simply re-scales
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
.
Virgilio Gómez-Rubio <virgilio.gomez@uclm.es>
INLA
inla.tmarginal
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")
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.