Learn R Programming

StratifiedMedicine (version 0.2.3)

param_lm: Parameter Estimation: Linear Regression

Description

For each identified subgroup, fit separate linear regression models. Point-estimates and variability metrics in the overall population are obtained by aggregating subgroup specific results (adaptive weighting or sample size weighting).

Usage

param_lm(Y, A, X, mu_hat, Subgrps, alpha_ovrl, alpha_s,
  combine = "adaptive", ...)

Arguments

Y

The outcome variable. Must be numeric or survival (ex; Surv(time,cens) )

A

Treatment variable. (a=1,...A)

X

Covariate space.

mu_hat

Patient-level estimates (See PLE_models)

Subgrps

Identified subgroups (can be the overall population)

alpha_ovrl

Two-sided alpha level for overall population

alpha_s

Two-sided alpha level at subgroup

combine

For overall population, method of combining subgroup-specific results. Default is "adaptive", "SS" corresponds to sample size weighting.

...

Any additional parameters, not currently passed through.

Value

Data-set with parameter estimates (average treatment effect) and corresponding variability metrics, for overall and subgroups. Subgrps=0 corresponds to the overall population by default.

  • param.dat - Parameter estimates and variability metrics (est, SE, LCL/UCL = lower/upper confidence limits, pval = p-value).

See Also

param_combine

Examples

Run this code
# NOT RUN {
library(StratifiedMedicine)

## Continuous ##
dat_ctns = generate_subgrp_data(family="gaussian")
Y = dat_ctns$Y
X = dat_ctns$X
A = dat_ctns$A

## Identify Subgroups: MOB (lmtree) ##
res_lmtree = submod_train(Y, A, X,  Xtest=X, submod="submod_lmtree")

## Parameter-estimation ##
params = param_lm(Y, A, X, Subgrps = res_lmtree$Subgrps.train, alpha_ovrl=0.05,
                  alpha_s=0.05)
params

# }

Run the code above in your browser using DataLab