Learn R Programming

aftgee (version 0.3-5)

prepX: Prepare Block Matrix for AFTGEE with multiple margins

Description

Prepare block matrix to be fitted with aftgee()

Usage

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
data(kidney)
x = cbind(kidney$sex, kidney$age)
## head(x)
marg = rep(1:2, 38)
xmat = prepX(x, marg, c("sex", "age"))
## head(xmat)

Run the code above in your browser using DataLab