rwe_cl: Composite Likelihood Estimation

Description Usage Arguments Value Examples

View source: R/psrwe_complikel.R

Description

Estimate parameter of interest based composite likelihood for a single PS stratum

Usage

1
2
3
4
5
6
7
rwe_cl(
  dta_cur,
  dta_ext,
  n_borrow = 0,
  outcome_type = c("continuous", "binary"),
  equal_sd = TRUE
)

Arguments

dta_cur

Vector of outcome from a PS stratum in current study

dta_ext

Vector of outcome from a PS stratum in external data source

n_borrow

Number of subjects to be borrowed

outcome_type

Type of outcomes: continuous or binary

equal_sd

Boolean. whether sd is the same between the current study and external data source

Value

Maximum composite likelihood estimator of the mean

Examples

1
2
3
x <- rnorm(100,  mean = 0, sd = 1)
y <- rnorm(1000, mean = 1, sd = 2)
rwe_cl(x, y, n_borrow = 20, equal_sd = FALSE)

psrwe documentation built on April 16, 2021, 9:07 a.m.