50% off: Unlimited data and AI learning.
State of Data and AI Literacy Report 2025

aftgee (version 0.3-20)

aftgee.prepX: Prepare Block Matrix for AFTGEE with multiple margins

Description

Prepare block matrix to be fitted with aftgee()

Usage

aftgee.prepX(xmat, margin, name = NULL)

Arguments

xmat
a matrix to be prepared into a block diagonal matrix.
margin
a vector specifying the error margin within cluster. The length of margin should be the same as the number of observations.
name
a optional character string specifying the column names of xmat.

Details

ll{ Package: aftgee Type: Package Version: 0.2-19 Date: 2012-03-12 License: GPL (>=3) LazyLoad: yes }

Examples

Run this code
library(survival)
data(kidney)
x = cbind(kidney$sex, kidney$age)
## head(x)
marg = rep(1:2, 38)
xmat = aftgee.prepX(x, marg, c("sex", "age"))
## head(xmat)

Run the code above in your browser using DataLab