TABLE OF CONTENTS


utility/g2ab [ Functions ]

NAME

    g2ab --- regression parameter conversion

FUNCTION

Extract alphars and betahat from a single vector named gamma

SYNOPSIS

1444 g2ab <- function(gamma, K)

INPUTS

    gamma      vector containing all hazard and regression parameters
    K          number of discretization intervals

OUTPUTS

    alphars    matrix of baseline hazard parameters 
    betahat    regression coefficient estimates 

SOURCE

1447 {
1448     ind <- 1
1449     alphars <- matrix(0, length(K), max(K) + 1)
1450     for(r in 1:length(K)){ 
1451         alphars[r, 1:K[r]] <- gamma[ind:(ind + K[r] - 1)]
1452         alphars[r, K[r] + 1] <- 100
1453         ind <- ind + K[r]
1454     }
1455     betahat <- gamma[ind:length(gamma)]
1456     return(list(alphars = alphars, betahat = betahat))
1457 }