R/utils.R
invlink_trans.Rd
apply inverse-link functions to parameter vector or list based on names
invlink_trans(p, unknown_link = "ignore", links = c("log", "log10", "logit"))
a named vector or list of parameter values with names of the form linkfun_name
action to take when unknown link is specified (ignored)
allowed link prefixes
Other classic_macpan:
add_d_log()
,
add_updated_vaxrate()
,
aggregate_agecats()
,
calibrate_comb()
,
calibrate()
,
check_age_cat_compatibility()
,
check_contact_rate_setting()
,
col_multiply()
,
condense_age()
,
condense_params_vax()
,
condense_state()
,
condense_vax()
,
dev_is_tikz()
,
do_step()
,
expand_params_age()
,
expand_params_desc_age()
,
expand_params_desc_variant()
,
expand_params_desc_vax()
,
expand_params_mistry()
,
expand_params_variant()
,
expand_params_vax()
,
expand_state_age()
,
expand_state_vax()
,
expand_stateval_testing()
,
fix_pars()
,
fix_stored()
,
forecast_ensemble()
,
forecast_sim()
,
getData()
,
get_GI_moments()
,
get_Gbar()
,
get_R0()
,
get_doses_per_day()
,
get_evec()
,
get_kernel_moments()
,
get_opt_pars()
,
get_r()
,
make_betavec()
,
make_beta()
,
make_jac()
,
make_ratemat()
,
make_state()
,
make_test_wtsvec()
,
make_vaxrate()
,
mk_Nvec()
,
mk_agecats()
,
mk_contact_rate_setting()
,
mk_mistry_Nvec()
,
mk_pmat()
,
mk_vaxcats()
,
mle_fun()
,
non_expanded_states
,
rExp()
,
read_params()
,
repair_names_age()
,
restore()
,
run_sim_ageify()
,
run_sim_break()
,
run_sim_loglin()
,
run_sim_mobility()
,
run_sim_range()
,
run_sim()
,
show_ratemat()
,
testify()
,
texify()
,
trans_state_vars()
,
update_contact_rate_setting()
,
update_foi()
,
update_params_mistry()
,
vis_model()
,
write_params()
invlink_trans(c(log_p1=0,logit_p2=0))
#> p1 p2
#> 1.0 0.5
invlink_trans(list(log_p1=c(0,0),logit_p2=c(0,0,0)))
#> $p1
#> [1] 1 1
#>
#> $p2
#> [1] 0.5 0.5 0.5
#>
invlink_trans(list(p1=c(log_a=0,log_b=0),p2=4))
#> $p1
#> a b
#> 1 1
#>
#> $p2
#> [1] 4
#>
tst <- list(params = c(log_beta0 = 0.693147180559945), log_nb_disp = 4.60517018598809)
invlink_trans(tst)
#> $params
#> beta0
#> 2
#>
#> $nb_disp
#> [1] 100
#>
tst2 <- list(params=c(log_E0=1,log_beta0=1),log_nb_disp=c(H=0,report=0,death=0))
invlink_trans(tst2)
#> $params
#> E0 beta0
#> 2.718282 2.718282
#>
#> $nb_disp
#> H report death
#> 1 1 1
#>
invlink_trans(list(time_beta=1,log_time_beta=0)) ## ignore non-link prefixes
#> $time_beta
#> [1] 1
#>
#> $time_beta
#> [1] 1
#>
invlink_trans(list(time_beta=c(2,3),log_time_beta=c(a=0,b=0))) ##
#> $time_beta
#> [1] 2 3
#>
#> $time_beta
#> a b
#> 1 1
#>