Learn R Programming

demu (version 0.3.0)

unscalemat: Unscale a matrix back to its original ranges.

Description

unscalemat() is a helper function to rescale a matrix back to its original ranges. Typically this is used to rescale the posterior samples of the parameters back to their original scale.

Usage

unscalemat(mat,r)

Arguments

mat

An \(n \times p\) matrix of numbers scaled to the \([0,1]\) hypercube

r

An \(p \times 2\) matrix of the original ranges of the variables

Value

A \(n \times p\) matrix with variables rescaled back to their original ranges, as specified by ranges.

See Also

getranges scaledesign

Examples

Run this code
# NOT RUN {
library(demu)

design=matrix(runif(10,1,5),ncol=2,nrow=5)
r=getranges(design)
design=scaledesign(design,r)
unscalemat(design,r)

# }

Run the code above in your browser using DataLab