Description Usage Arguments Value

View source: R/calculate_m_eff.R

Instead of providing a desired effective number of parameters, the user provides the scale value(s), which is c in the notation of Boonstra and Barbaro, and the the function gives the implied prior number of effective parameters based upon this. As with 'solve_for_hiershrink_scale', the user can provide one global scale parameter (scale1, leaving scale2 = NA) that applies to all parameters, or two regional scale parameters (scale1, scale2), that applies to a partition of the parameters as defined by the first npar1 parameters and the second npar2 parameters.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ```
calculate_m_eff(
scale1,
scale2 = NA,
npar1,
npar2 = 0,
local_dof = 1,
regional_dof = -Inf,
global_dof = 1,
slab_precision = (1/15)^2,
n,
sigma = 2,
tol = .Machine$double.eps^0.5,
max_iter = 100,
n_sim = 2e+05
)
``` |

`scale1` |
global (if scale2=NA) or regional scale parameter value 1 |

`scale2` |
regional scale parameter value 2, can be NA if scale 1 is specified |

`npar1` |
partition of the parameters |

`npar2` |
second part of partition of the parameters |

`local_dof` |
(pos. integer) numbers indicating the degrees of freedom for lambda_j and tau, respectively. Boonstra, et al. never considered local_dof != 1 or global_dof != 1. |

`regional_dof` |
regional degrees of freedom |

`global_dof` |
(pos. integer) numbers indicating the degrees of freedom for lambda_j and tau, respectively. Boonstra, et al. never considered local_dof != 1 or global_dof != 1. |

`slab_precision` |
(pos. real) the slab-part of the regularized horseshoe, this is equivalent to (1/d)^2 in the notation of Boonstra and Barbaro |

`n` |
sample size |

`sigma` |
varaince |

`tol` |
tolerance level |

`max_iter` |
max number of iterations |

`n_sim` |
number of simulates |

A list containing prior numbers 1 and 2, the implied prior number of effective parameters.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.