search for: mhsim

Displaying 1 result from an estimated 1 matches for "mhsim".

Did you mean: mcsim
2002 Nov 25
3
How top print intermediate values from inside a function?
Hi: In R, how do I display some intermediate results calculated in a "for" loop within a function? For example, in the attached 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...