vc.pb {vcPB} | R Documentation |
Varying-Coefficient Disparity Decomposition Analysis for a Longitudinal Data
Description
The vc.pb
offers Peters-Belson(PB) type of nonparametric varying-coefficient regression method which measures the disparity between a majority group
and a minority group for the longitudinal data.
Usage
vc.pb(
formula,
group,
data,
id,
modifier = NULL,
local_time = NULL,
bandwidth_M = NULL,
bandwidth_m = NULL,
bandwidth_xM = NULL,
bandwidth_xm = NULL,
bandwidth_Z_M = NULL,
bandwidth_Z_m = NULL,
bandwidth_Z_xM = NULL,
bandwidth_Z_xm = NULL,
detail = FALSE,
...
)
Arguments
formula |
a formula for the model. |
group |
a vector within the |
data |
a data frame and data has to be included with the form of |
id |
a vector within the |
modifier |
(optional) a vector from the |
local_time |
(optional) a vector used for the local points of time variable in the kernel regression. |
bandwidth_M |
(optional) a bandwidth for the time variable used for estimating the time-varying coefficient of the majority group. |
bandwidth_m |
(optional) a bandwidth for the time variable used for estimating the time-varying coefficient of the minority group. |
bandwidth_xM |
(optional) a vector of |
bandwidth_xm |
(optional) a vector of |
bandwidth_Z_M |
(optional) a bandwidth for the varying variable used for estimating the time-varying coefficient of the majority group. Used only when the class of |
bandwidth_Z_m |
(optional) a bandwidth for the varying variable used for estimating the time-varying coefficient of the minority group. Used only when the class of |
bandwidth_Z_xM |
(optional) a vector of |
bandwidth_Z_xm |
(optional) a vector of |
detail |
a bool argument whether the detailed results are provided or not. |
... |
used for controlling the others. |
Value
vc.pb
returns an object of class "vc.pb"
, which is a list containing
following components:
call |
a matched call. |
overall_disparity |
overall disparity between major and minor groups. |
explained_disparity |
explained disparity between major and minor groups, this component is given only when |
explained_disparity_by_X |
explained disparity from the variables without |
explained_disparity_by_Z |
explained disparity from |
unexplained_disparity |
unexplained disparity between major and minor groups. |
times |
local time points used for kernel regression. |
major |
a majority group label. |
minor |
a minority group label. |
modfier , varying.type |
the modifier variable and the type of the modifier variable, these components are given only when |
bandwidths |
various corresponding bandwidths. Please see the details or the attached reference for more information. |
Author(s)
Sang Kyu Lee
Examples
set.seed(1)
n <- 100
x1 <- rnorm(n)
x2 <- rnorm(n)
time <- rep(1:5, 20) + runif(n)
y <- rnorm(n)
sub_id <- rep(1:25, 1, each = 4)
group <- rep(as.character(1:2), 25, each = 2)
z <- as.character(rbinom(n, 1, prob = 0.5))
data <- data.frame(y = y, x1 = x1, x2 = x2, z = z, group = group, time = time, sub_id = sub_id)
fit <- vc.pb(y ~ (x1|time) + x2, data = data, id = sub_id, group = group)
fit