Dear Sir,
Thanks a lot for your eye-opener reply. I was just thinking of our usual commands like rnorm, runif etc. So I was wondering if there exists something like rwakeby etc. 
And lastly, I have calculated the parameters using 
> lmr                    = lmom.ub(amounts)
> parameters_of_Wakeby   = parwak(lmr)
whereas you have mentioned  lmom2par(), Will it create different set of parameters? Actually I am travelling and don't have R installed on the laptop I am carrying with me to verify ther results.
Regards
Katherine


--- On Mon, 21/1/13, David Winsemius <dwinsemius@comcast.net> wrote:

From: David Winsemius <dwinsemius@comcast.net>
Subject: Re: [R] lmomco package - Random number generation using Wakeby distribution
To: "Katherine Gobin" <katherine_gobin@yahoo.com>
Cc: r-help@r-project.org
Date: Monday, 21 January, 2013, 7:46 PM


On Jan 21, 2013, at 10:30 AM, Katherine Gobin wrote:

> Dear R forum
> 
>> From the given data, I have estimated the parameters of Wakeby distribution using lmomco package as
> 
> library(lmomco)
> 
> (amounts <- read.csv("input_S.csv")$amount)
> 
> # ___________________________________________________________
> 
> # Wakeby distribution - Parameter estimation
> 
> N                      =
> length(amounts)
> lmr                    = lmom.ub(amounts)
> parameters_of_Wakeby   = parwak(lmr)

It appears you have a) not included the code that produced that output and b) failed to read the Index page for that package

help(package="lmomco")

help(package="lmomco")

?rlmomco    #  Random Deviates of a Distribution

So on the assumption that you have an object in your workspace named "parameters_of_Wakeby" and it is an lmomco produced object like that returned by lmom2par() I would try:

rlmomco(100, parameters_of_Wakeby) 


> 
>> parameters_of_Wakeby
> 
> $type
> [1]
> "wak"
> 
> $para
>                   xi                alpha 
> 1.18813927666405e+04 0.00000000000000e+00 
>                 beta                gamma 
> 0.00000000000000e+00 8.11391042554567e+04 
>                delta 
> 9.57554297149062e-01 
> 
> This means the scale parameters are 0.
> 
> However, assuming, all the five parameters of Wakeby distribution (viz. location parameter m (xi), the scale parameters a, b, and shape parameters  g and d are available. 
> 
> Then, how do I generate say 100 random no.s using Wakeby distribution w.r.t. these
> 5 available parameters.
> 
> I couldn't find any information about this in lmomco. Kindly guide if random no.s can be generated or not and if yes, how it can be done in r.

You should have been able to find this with:

help.search("random", package="lmomco")

-- 

David Winsemius
Alameda, CA, USA


	[[alternative HTML version deleted]]

