find_grid_alpha {PhylogeneticEM} | R Documentation |
Find a reasonable grid for alpha
Description
Grid so that 2*ln(2)*quantile(d_ij)/factor_up_alpha < t_1/2 < factor_down_alpha * ln(2) * h_tree, with t_1/2 the phylogenetic half life: t_1/2 = log(2)/alpha. Ensures that for alpha_min, it is almost a BM, and for alpha_max, almost all the tips are decorrelated.
Usage
find_grid_alpha(
phy,
alpha = NULL,
nbr_alpha = 10,
factor_up_alpha = 2,
factor_down_alpha = 3,
quantile_low_distance = 1e-04,
log_transform = TRUE,
allow_negative = FALSE,
...
)
Arguments
phy |
phylogenetic tree of class " |
alpha |
fixed vector of alpha values if already known. Default to NULL. |
nbr_alpha |
the number of elements in the grid |
factor_up_alpha |
factor for up scalability |
factor_down_alpha |
factor for down scalability |
quantile_low_distance |
quantile for min distance |
log_transform |
whether to take a log scale for the spacing of alpha values. Default to TRUE. |
allow_negative |
whether to allow negative values for alpha (Early Burst).
See documentation of |
... |
not used. |
Details
If quantile_low_distance=0
, then quantile(d_ij)=min(d_ij)
, and, for any
two tips i,j, the correlation between i and j is bounded by exp(-factor_up_alpha/2).
Those values of alpha will be used for the re-scaling of the tree, which has an
exponential term in exp(2*alpha*h). The function makes sure that this number is
below the maximal float allowed (equals to .Machine$double.xmax
).
Value
A grid of alpha values
See Also
transform_branch_length
, .Machine