ps.estimate: Estimation of propensity score based treatment effects

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/ps.estimate.R

Description

Estimation of propensity score based treatment effects

Usage

1
2
3
  ps.estimate(object,resp,treat = NULL, stratum.index = NULL,
  match.index = NULL, adj = NULL, weights = "rr", family = "gaussian",
  regr = NULL, ...)

Arguments

object

an object of class 'stratified.pscore', 'stratified.data.frame', 'matched.pscore', 'matched.data.frame', 'matched.data.frames' or a data frame.

resp

an integer or a string indicating the outcome variable in the data and in the matched data if ps.match() is previously used.

treat

an integer or a string indicating the treatment variable in the data and in the matched data if ps.match() is previously used. If the class of the input object is 'stratified.pscore' or 'matched.pscore', no specification is needed.

stratum.index

an integer or a string indicating the vector containing the stratum indices. No specification is needed if ps.makestrata() is previously used.

match.index

an integer or a string indicating the vector containing the matching indices. No specification is needed if ps.match() is previously used.

adj

a formula or a vector of integers or strings indicating covariates. The default is NULL, i.e. no additional adjustment for covariates is done in stratified or matched data. If adj is a formula, it must be formulated as 'outcome~treatment+covariates' according to resp and treat. If adj is a vector, it contains names or integers indicating covariates for which the treatment effect has to be adjusted for.

weights

a string indicating how to weight the stratum-specific estimates to obtain an overall estimate in case of stratified data. The default is 'rr' indicating stratum-specific weights proportional to the stratum-specific number of observations. In case of linear outcome, weights = 'opt' can be used, i.e. weights are optimal in sence of variance minimizing.

family

a description of the error distribution and link function to be used in the model (see glm).

regr

a formula or a vector of integers or strings indicating covariates in data. The default is NULL, i.e. no regression model is fitted. If regr is a formula, it must be formulated as 'outcome~treatment+covariates' according to resp and treat. If regr is a vector, it contains names or integers indicating covariates for which the treatment effect on outcome estimated by regression has to be adjusted.

...

further arguments passed to or from other methods.

Details

Propensity score methods are used to estimate treatment effects in observational data. The treatment effects are estimated without adjustment and can to be interpreted as marginal effects. However, it is additionally possible to adjust for residual imbalances in strata or in the matched data (using adj) and also to apply traditional regression (using regr).

The usage of ps.estimate() depends slightly on the class of the input object. If either ps.makestrata() or ps.match() are previously used, treat, match.index and stratum.index are not needed, contrary to the case where the input object is a data frame. If both match.index and stratum.index are specified, stratum.index will be ignored. If one specifies adj and regr as formulas, they must be identical in form of 'outcome~treatment+covariates' and 'outcome' and 'treatment' must agree with resp and treat.

Value

ps.estimate returns an object of the same class as the input object. The number and the manner of values depends on the scale of resp:

data

a data frame containing the input data.

data.matched

a data frame limiting 'data' only to matched observations. It is only available if ps.match() is previously used.

name.resp

a string indicating the name of the outcome variable.

resp

a numeric vector indicating the outcome variable labeled by 'name.resp'.

name.stratum.index

a string indicating the name of the selected stratum indices. It is only available if ps.makestrata() is previously used.

stratum.index

a numeric vector containing the selected stratum indices labeled by 'name.stratum.index'. It is only available if ps.makestrata() is previously used.

intervals

a vector of characters indicating the interval used for stratification. It is only available if ps.makestrata() is previously used.

stratified.by

a string indicating the name of the selected stratification variable. It is only available if ps.makestrata() is previously used.

formula.pscore

a formula describing formally the propensity score model fitted at last.

model.pscore

an object of class glm containing information about the propensity score model fitted at last.

name.pscore

a string indicating the name of propensity score estimated at last.

pscore

a numeric vector containing the estimated propensity score labeled by 'name.pscore.

name.treat

a string indicating the name of the treatment variable.

treat

a numeric vector containing the treatment index labeled by 'name.treat'.

matched.by

a string indicating the name of the selected matching variable. It is only available if ps.match() is previously used.

name.match.index

a string indicating the name of the selected matching indices. It is only available if ps.match() is previously used.

match.index

a numeric vector containing the selected matching indices labeled by 'name.match.index' whereas '0' indicates 'no matching partner found'. It is only available if ps.match() is previously used.

match.parameters

a list of matching parameters including caliper, ratio, who.treated, givenTmatchingC and bestmatch.first. It is only available if ps.match() is previously used.

lr.estimation

a list containing information about the regression model based treatment effect estimates. It correspond to the argument regr.

effect

the estimated conditional treatment effect based on regression. It is an odds ratio for binary outcome.

effect.marg

the estimated marginal treatment effect based on regression. It is an odds ratio for binary outcome. Conditional and marginal treatment effects are identical if the outcome is assumed to be normally distributed.

se

the estimated standard error for effect. For binary outcome, it is given on the log scale.

se.marg

the estimated standard error for effect.marg. For binary outcome, it is given on the log scale.

regr.formula

a formula describing formally the fitted regression outcome model correspond to regr.

regr.model

a glm object containing information of the fitted regression outcome model correspond to regr.

ps.estimation

a list containing information about the estimated propensity score based treatment effects. The list entries depend on the scale of outcome.

crude

a list containing information about the crude treatment effect estimated by 'outcome~treatment':

effect

the estimated crude treatment effect. For binary outcome, it is an odds ratio.

se

the estimated standard error of 'effect'. For binary outcome, it is given on log scale.

adj

a list containing information about the estimated adjusted propensity score based treatment effect corresponding to adj:

model

outcome model applied in each stratum or in the matched data to adjusted for covariates.

effect.str

the estimated adjusted stratum-specific treatment effects. For binary outcome, it is an odds ratio. It is only availabe for stratified data.

effect

the estimated adjusted overall treatment effect. For binary outcome, it is an odds ratio.

se

the estimated standard error of effect. For binary outcome, it is given on log scale.

unadj

a list containing information about the estimated unadjusted propensity score based treatment effect. The list entries depend on the scale of response:

effect

the estimated marginal treatment effect. For binary outcome, it is an odds ratio based on outcome rates.

se

the estimated standard error of effect. For binary outcome, it is given on log scale.

p1

a numeric indicating the estimated marginal outcome probability for treatment labeled by the upper value. It is only available for binary outcome and stratified data.

p0

a numeric indicating the estimated marginal outcome probability for treatment labeled by the lower value. It is only available for binary outcome and stratified data.

p1.str

a numeric indicating the estimated stratum-specific outcome probabilities for treatment labeled by the upper value. It is only available for binary outcome and stratified data.

p0.str

a numeric indicating the estimated stratum-specific outcome probabilities for treatment labeled by the lower value. It is only available for binary outcome and stratified data.

effect.mh

the stratified Mantel-Haenszel estimate for the treatment effect. It is only available for binary outcome and stratified data.

se.mh

the estimated standard error for effect.mh. It is only available for binary outcome and stratified data.

odds.str

the estimated stratum-specific odds ratio used for the stratified Mantel-Haenzsel estimator. It is only available for binary outcome and stratified data.

weights

a string indicating the selected weights scheme.

weights.str

a numeric vector containing the stratum-specific weights. It is only available for stratified data.

Author(s)

Susanne Stampf susanne.stampf@usb.ch

See Also

glm, formula, lmer

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
## STU1
data(stu1)
stu1.ps <- pscore(data    = stu1, 
                  formula = therapie~tgr+age)
stu1.match <- ps.match(object          = stu1.ps,
                       ratio           = 2,
                       caliper         = 0.5,
                       givenTmatchingC = FALSE,
                       matched.by      = "pscore",
                       setseed         = 38902)
stu1.est <-
  ps.estimate(object  = stu1.match,
              resp    = "pst",
              adj     = "tmass",
              regr    = pst~therapie+tgr+age)

## PRIDE
data(pride)
pride.ps <- pscore(data        = pride,
                   formula     = PCR_RSV~SEX+RSVINF+REGION+
                                 AGE+ELTATOP+EINZ+EXT,
                   name.pscore = "ps")
pride.strata <- ps.makestrata(object = pride.ps,
                              breaks = quantile(pride.ps$pscore,  
                                                seq(0,1,0.2)),
                              stratified.ps = "ps")
pride.est <-
  ps.estimate(object  = pride.strata,
              resp    = "SEVERE",
              family  = "binomial",
              adj     = "AGE",
              regr    = SEVERE ~PCR_RSV+SEX+ETHNO+FRUEHG+HERZ+
                        ELTATOP+REGION+AGE+TOBACCO+VOLLSTIL+EXT+
                        EINZ+KRANKSUM,
              weights = "rr")

nonrandom documentation built on May 29, 2017, 11:41 p.m.