covNB: Computes the covariance between net benefit values from 2...

Description Usage Arguments Details Value Author(s) Examples

Description

The function takes 2 datasets and a vector of wilingness-to-pay values. The dataset MUST have 4 columns ID, RESPONSE, COST and TREATMENT which hold respectively unique subject identifiers, treatment outcome, treatment cost and 2 treatment arms names. If no values are for wilingness-to-pay, 101 default values ranging from 0 to 500,000 are used to compute net benefits and covariance between net benefits from the 2 datasets

Usage

1
2
covNB(data1 = NULL, data2 = NULL, will2pay = NULL, extraOutput = FALSE,
  CI = 0.95, treatResponse = "beneficial")

Arguments

data1

a dataset with 4 columns holding respectively, ID, treatment outcome, treatment cost and treatment arm.

data2

a dataset with 4 columns holding respectively, ID, treatment outcome, treatment cost and treatment arm.

will2pay

a numeric vector of willingness-to-pay thresholds.

extraOutput

a boolean set to FALSE by default, if set to TRUE other information are returned in addition to covNB, the covariance between net benefits from the two datasets.

CI

confidence interval.

treatResponse

a character, default is beneficial i.e. the treatment resulted in beneficial response; otherwise harmful, the treatement resulted in harmful outcome

Details

to be written

Value

a list which holds the below items; items other than covNB are optional, set the the parameter extraOutput to have those items returned: covNB covariance between net benefits from the two datasets rhoNB correlation between net benefits from the two datasets covCostA covariance of costs between the two datasets for the 1st treatment arm covCostB covariance of costs between the two datasets for the 2nd treatment arm covOutcomeA covariance of outcomes between the two datasets for the 1st treatment arm covOutcomeB covariance of outcomes between the two datasets for the 2nd treatment arm

Author(s)

Amadou Gaye & Felix Achana

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
{

# load examples datasets
data(dataset1); data(dataset2)

# covNB computation using the default willingness-to-pay thresholds
covValues <- covNB(data1=dataset1, data2=dataset2)

# covNB computation using the default willingness-to-pay thresholds 
#and request extra information.
covValues <- covNB(data1=dataset1, data2=dataset2, extraOutput=TRUE)

}

agaye/ceeComp documentation built on May 10, 2019, 7:32 a.m.