risk_theta_vect: Expected risk based on a posterior sample

Description Usage Arguments Value Author(s) See Also Examples

View source: R/risk_theta_vect.R

Description

The function computes the expected risk based on the empirical distribution defined by the sample thetas_trans.

Usage

1
risk_theta_vect(thetas_trans, n_params)

Arguments

thetas_trans

A matrix which row represent parameter values in physical space (after applying transform_params).

n_params

The number of parameters to be estimated

Value

A numerical value

Author(s)

Edouard Pauwels

See Also

risk_theta_fun

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
data(knobjs)
sapply(	
	1:length(knobjs),
	function(k){
		assign(names(knobjs)[k], knobjs[[k]], envir = .GlobalEnv)
	}
)

thetas <- knobjActMult1$datas[[1]]$thetas[1:10,]

thetas_trans <- t(apply(thetas, 1, transform_params))
risk_theta_vect(thetas_trans, 9)

pauwels2014 documentation built on May 29, 2017, 9:03 a.m.