RCaller has a wrapper class, under the package statistics, for generating random number for those distributions. The class statistics. RandomNumberGenerator has these functions:
public double[] randomNormal(int n, double mean, double standardDeviation) public double[] randomLogNormal(int n, double logmean, double logStandardDeviation) public double[] randomUniform(int n, double min, double max) public double[] randomBeta(int n, double shape1, double shape2) public double[] randomCauchy(int n, double location, double scale) public double[] randomT(int n, int df) public double[] randomChisqyare(int n, int df) public double[] randomF(int n, int df1, int df2) public double[] randomPoisson(int n, double lambda) public double[] randomBinom(int n, int size, double p) public double[] randomNegativeBinom(int n, int size, double p) public double[] randomMultinomial(int n, int size, double p) public double[] randomGeometric(int n, double p) public double[] randomWeibull(int n, double shape, double scale) throws public double[] randomHyperGeometric(int amount, int n, int m, int k) public double[] randomExponential(int n, double theta) throws Exception public double[] randomGamma(int n, double shape, double rate, double scale)
One can see the usage of class in the Test5 class in the source of RCaller 2.0.
http://code.google.com/p/rcaller/source/browse/RCaller/src/test/Test5.java
No comments:
Post a Comment
Thanks