Learn R Programming

psrwe (version 3.2)

rwe_cl: Composite Likelihood Estimation

Description

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

Usage

rwe_cl(
  dta_cur,
  dta_ext,
  n_borrow = 0,
  outcome_type = c("continuous", "binary"),
  equal_sd = TRUE
)

Value

Maximum composite likelihood estimator of the mean

Arguments

dta_cur

Vector of outcome from a PS stratum in the current study

dta_ext

Vector of outcome from a PS stratum in the 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

Examples

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

Run the code above in your browser using DataLab