R/risk_theta_vect.R

Defines functions risk_theta_vect

Documented in risk_theta_vect

risk_theta_vect <-
function(thetas_trans, n_params){
	## Expected risk based on a sample in matrix form
	
	risk_current <- 0
	for(i in 1:nrow(thetas_trans)){
		risk_current <- risk_current + sum( log(t(t(thetas_trans) / thetas_trans[i,]) )^2 ) / n_params / nrow(thetas_trans)^2
	}
	risk_current
}

Try the pauwels2014 package in your browser

Any scripts or data that you put into this service are public.

pauwels2014 documentation built on May 1, 2019, 6:29 p.m.