View source: R/psrwe_powerprior_watt.R
psrwe_powerp_watt | R Documentation |
Draw posterior samples of the parameters of interest for the PS-power prior approach with weights of ATT (WATT)
psrwe_powerp_watt(
dta_psbor,
v_outcome = "Y",
outcome_type = c("continuous", "binary"),
prior_type = c("fixed", "random"),
...,
seed = NULL
)
dta_psbor |
A class |
v_outcome |
Column name corresponding to the outcome. |
outcome_type |
Type of outcomes: |
prior_type |
Whether treat power parameter as fixed ( |
... |
extra parameters for calling function |
seed |
Random seed. |
A class PSRWE_RST
list with the following objects
Observed mean and SD of the outcome by group, arm and stratum
A list of estimated mean and SD of the outcome by stratum in the control arm
A list of estimated mean and SD of the outcome by stratum in the treatment arm for RCT
A list of estimated mean and SD of the treatment effect by stratum for RCT
Borrowing information from dta_psbor
Result from STAN sampling
data(ex_dta)
dta_ps <- psrwe_est(ex_dta,
v_covs = paste("V", 1:7, sep = ""),
v_grp = "Group",
cur_grp_level = "current",
nstrata = 1)
ps_borrow <- psrwe_borrow(total_borrow = 30, dta_ps)
rst <- psrwe_powerp_watt(ps_borrow, v_outcome = "Y_Bin", seed = 123)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.