calc_mse: Calculates the MSE over all non-zero pixels

Description Usage Arguments Details Value

View source: R/calc_mse.R

Description

Calulation is done by automatically indication non-zero pixels. See Details.

Usage

1
2
calc_mse(res, alpha = 0.05, trueBeta, info = TRUE, tol = 1e-04,
  reduce = mean)

Arguments

res

matrix, contains in each row the simulated Markov chain from sarim. (e.g. by using get_beta(reduce = FALSE)) Therefore each row corresponds to a specific beta.

alpha

numeric between 0 and 1, defining the width of the credibility interval (see details)

trueBeta

the true coefficient image (e.g. smoothBeta()).

info

logical, if true the number of non-zero pixels will be printed.

tol

numeric, threshold at which value a pixel is assumed to be zero.

Details

The MSE is calculated over the union of all non-zero pixels of the estimated and the real coefficient image. Firstly the credible inverval for each markov chain is calculated (i.e. alpha/2 for lower and upper bound). Afterwards it will be examined, if the interval contains the zero. Then all coefficients, which are non-zero (indicated through the credible interval or in the real coefficient image) will be used for the calculation of the MSE between the true and the estimated image where one has to specify the point estimatior for the posterior (default is mean).

Value

Returns MSE


RaphaelRe/SOIR documentation built on May 28, 2019, 12:19 p.m.