Skip to content

Commit

Permalink
Try deal with the xlevs stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
sambrilleman committed Oct 31, 2023
1 parent 47b7e02 commit bda83b8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/pp_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ pp_data <-
mf[, colnames(mf_s)] <- mf_s

# construct time-varying predictor matrix
s <- make_s(formula, mf, xlevs = object$xlevs)
s <- make_s(formula, mf)

if (all(is.na(pts))) {
# if pts were all NA then replace the time-varying predictor
Expand Down
2 changes: 1 addition & 1 deletion R/stan_surv.R
Original file line number Diff line number Diff line change
Expand Up @@ -748,7 +748,7 @@ stan_surv <- function(formula,
if (has_tve) {

# time-varying predictor matrix
s_cpts <- make_s(formula, mf_cpts, xlevs = xlevs)
s_cpts <- make_s(formula, mf_cpts)
smooth_map <- get_smooth_name(s_cpts, type = "smooth_map")
smooth_idx <- get_idx_array(table(smooth_map))
S <- ncol(s_cpts) # number of tve coefficients
Expand Down

0 comments on commit bda83b8

Please sign in to comment.