Displaying 1 result from an estimated 1 matches for "likfn".
Did you mean:
liken
2002 Nov 25
3
How top print intermediate values from inside a function?
...ed code, how do I
get it to print the intermediate variable "mh.new" for each simulation,
when I call the function "MHsim.ind"?
thanks for any help,
Ravi.
####################################################################
MHsim.ind <- function(nsim=1000,start=0,spread=1,likfn=bpllkd){
# Independence Metropolis algorithm with candidate density a
#multivariate Student t-distribution with 1 degree of freedom, whose
#mean and variance are taken to be MLE and its covariance matrix
mh.0 <- start
npar <- length(start)
mh.sim <- matrix(0,nrow=nsim,ncol=npar)
i <-...