HighlanderLab / SIMplyBee

SIMplyBee R package extends AlphaSimR for simulating honeybee populations and breeding programmes
http://www.simplybee.info/
Other
0 stars 5 forks source link

Why don't sampling functions use SP$ values as defaults? #462

Open janaobsteter opened 1 year ago

janaobsteter commented 1 year ago

Example, why does nFatherPoisson not use whatever is in the SP$nFather as a default? Currently, it's specified like this:

nFathersPoisson <- function(n = 1, average = 15) {
  return(rpois(n = n, lambda = average))
}
gregorgorjanc commented 1 year ago

Interesting thought!

So, using them on its own, it would indeed make sense to have them use the mean from the SP$nFathers.

But, note that we also allow storing these sampling functions into SP, so then the function would be trying to look for parameter from itself!?

I do think you are onto something interesting here!!! We could have SP$nFathers and SP$nFathersMean, which would be the same if it’s a value, but if SP$nFathers is a function, then it takes the mean from SP$nFathersMean. We need to flesh this out a bit more I think!!!

LStrachan commented 9 months ago

We've identified which functions need to be addressed with this issue. See #170 for more.


# nDronesPoisson -----
Dotted pair list of 3
$ x      : symbol 
$ n      : num 1
$ average: num 100 --> we should address this

# nDronesTruncPoisson ----
Dotted pair list of 4
$ x         : symbol 
$ n         : num 1
$ average   : num 100 --> we should address this
$ lowerLimit: num 0

# nFathersPoisson ----- 
Dotted pair list of 2
$ n      : num 1
$ average: num 15 --> we should address this

# nFathersTruncPoisson ----
Dotted pair list of 3
$ n         : num 1
$ average   : num 15 --> we should address this
$ lowerLimit: num 0

# nVirginQueensPoisson ----
Dotted pair list of 3
$ colony : symbol 
$ n      : num 1
$ average: num 10 --> we should address this

# nVirginQueensTruncPoisson -----
Dotted pair list of 4
$ colony    : symbol 
$ n         : num 1
$ average   : num 10 --> we should address this
$ lowerLimit: num 0

# nWorkersPoisson -----
Dotted pair list of 3
$ colony : symbol 
$ n      : num 1
$ average: num 100 --> we should address this 

# nWorkersTruncPoisson -----
Dotted pair list of 4
$ colony    : symbol 
$ n         : num 1
$ average   : num 100 --> we should address this 
$ lowerLimit: num 0

# splitPColonyStrength -----
Dotted pair list of 4
$ colony      : symbol 
$ n           : num 1
$ nWorkersFull: num 100 --> we should address this
$ scale       : num 1

# splitPUnif -----
Dotted pair list of 4
$ colony: symbol 
$ n     : num 1
$ min   : num 0.2 --> we should address this 
$ max   : num 0.4 --> we should address this 

# swarmPUnif ----
Dotted pair list of 4
$ colony: symbol 
$ n     : num 1
$ min   : num 0.4 --> we should address this
$ max   : num 0.6 --> we should address this 

# createMatingStationDCA -----
Dotted pair list of 4
$ colony      : symbol 
$ nDPQs       : num 20 --> we should address this 
$ nDronePerDPQ: NULL
$ simParamBee : NULL

# downsizePUnif ----
Dotted pair list of 4
$ colony: symbol 
$ n     : num 1
$ min   : num 0.8 --> we should address this 
$ max   : num 0.9 --> we should address this