Content posted must be directly related to Rust. Memes are okay, but moderators will use their discretion if/when things get out of hand. No server advertisements / looking for server / looking for group posts. No server admin abuse / server complaints. We do not tolerate witch hunts in the playrust subreddit. API documentation for the Rust `min` fn in crate `std`.
![Rust Rust](/uploads/1/2/5/6/125638916/142895223.png)
.The rust package implements the multivariate generalized ratio-of-uniforms method of simulating random variates from a (d)-dimensional continuous distribution. The user specifies (the log of) a positive target function (f(x)) proportional to the density function of the distribution. For an introduction to rust see the vignette.This vignette describes a new feature of rust: the option for the user to provide a C function to evaluate the target log-density, rather than an R function. The Rcpp (Eddelbuettel and Francois 2011, Eddelbuettel (2013)) and RcppArmadillo (Eddelbuettel and Sanderson 2014) packages are used to speed up simulation from the target density.
The improvement results from faster function evaluations and (in particular) from performing using C the looping in the ratio-of-uniforms algorithm. The new function rurcpp requires the target log-density to be specified using (externals pointers to) C functions, whereas the existing ru requires input R functions. Otherwise, the functionality of these two functions is the same. There are also Rcpp-based versions of functions for setting Box-Cox transformation parameters: findlambdarcpp and findlambdaonedrcppIn this vignette we describe in general terms the general setup of the Rcpp-based functions and use examples to illustrate their use. For more information about these examples see the vignette.
Temp $lambda # 1 0.1624226 0.3678549 # # $gm # 1 1.10542493 0.03225836 # # $initpsi # 1 0.1054021 -0.2184344 # # $sdpsi # Var1 Var2 # 0.12670792 0.02477219 # # $phitotheta # # # $logj # # # $userargs # $userargs$xm # 1 1.846219.