hello 
 
i have a few quick questions. 
i am using a windows platform.
 
how does one include functions from a particular r package in the C code. e.g. 
rgamma can be included if we include #include <R.h>
#include <Rmath.h> , and #include <math.h>  in the C code. what should be 
included if i want to use functions that are inside the MASS package (for 
example)?
When performing mcmc one often has code that looks something like this: (an 
example)


for (i in 1: largenumber)
{


simulate from a MULTIVARIATE normal distribution. (variables are not all 
independent!)
simulate from some gamma distribution
perform some kind of metropolis hastings step}
some other stuf....
 
assuming that one is unable to vectorise the R code, does it make sense to 
write C code to do all of the above steps? how dramatic will the time saved be? 
(any ideas)
 
regards
 




 

Allan Clark
========
Lecturer in Statistical Sciences Department
University of Cape Town
7701 Rondebosch
South Africa
TEL (Office): +27-21-650-3228
FAX: +27-21-650-4773
http://web.uct.ac.za/depts/stats/aclark.htm
 

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to