Closed gregorgorjanc closed 9 months ago
The inability to specify this parameter is by design. The rate/scale parameter is addressed by AlphaSimR when it scales the magnitude of the effects to achieve a desired level of genetic variance. This is equivalent to how you don't supply the standard deviation for the Gaussian distribution.
I added this into docs (I have now been asked a couple of times, so best to have it in the docs) and opened a PR #157 for this change, hence closing this issue
Is your feature request related to a problem? Please describe.
SimParam$addTraitX
allows for gamma distribution, but only its shape parameter, while gamma distribution is defined with shape and rate parameter.Describe the solution you'd like We should add
rate=1
toSimParam$addTraitX
and pass it internally tosampAddEff
(https://github.com/gaynorr/AlphaSimR/blob/695aef000a50061fcef36aad2d85f92b3db2aab5/R/Class-SimParam.R#L2372C20-L2372C20) andsampEpiEff
(https://github.com/gaynorr/AlphaSimR/blob/695aef000a50061fcef36aad2d85f92b3db2aab5/R/Class-SimParam.R#L2394)Describe alternatives you've considered We could think of passing any kind of distribution by using the
FUN=rx
so thesampXEff
functions would call theFUN
function to sample effects and then any distribution parameters could be passed to thesesampXEff
functions via...
.Any thoughts on adding the gamma's rate parameter?