jgellar / pcox

Penalized Cox regression models
1 stars 0 forks source link

Errors in pcox.testing2.R #26

Closed fabian-s closed 9 years ago

fabian-s commented 9 years ago
d> # TIME-VARYING MODEL
d> fit2.2 <- pcox(Surv(time, event) ~ p(x, linear=FALSE, tv=T) +
+                  male, data=data2)
 Error in create.tt.func(limits, linear, tv, basistype, sind, integration,  : 
  Unrecognized input for limits argument 
6 stop("Unrecognized input for limits argument") at create.tt.func.R#38
5 create.tt.func(limits, linear, tv, basistype, sind, integration, 
    standardize, s.transform, t.transform, basisargs, method, 
    eps, map) at p.R#144
4 p(x, linear = FALSE, tv = T, method = "aic", eps = 1e-06) 
3 eval(expr, envir, enclos) 
2 eval(terms[[i]], envir = evalenv, enclos = frmlenv) at pcox.R#165
1 pcox(Surv(time, event) ~ p(x, linear = FALSE, tv = T) + male, 
    data = data2) 
d> fit3.1 <- pcox(Surv(time,event) ~ bf(myX, bs="ps", sind=sind) + male, data=data3)
 Error in pcoxTerm(x, limits = limits, linear = linear, tv = FALSE, basistype = basistype,  : 
  argument "s0" is missing, with no default 
3 pcoxTerm(x, limits = limits, linear = linear, tv = FALSE, basistype = basistype, 
    sind = sind, integration = integration, standardize = standardize, 
    s.transform = s.transform, t.transform = t.transform, basisargs = basisargs, 
    method = method, eps = eps, smooth = smooth) at create.xt.func.R#35
2 xt.i(trm$x) at pcox.R#186
1 pcox(Surv(time, event) ~ bf(myX, bs = "ps", sind = sind) + male, 
    data = data3) 
d> fit5.1c <- pcox(Surv(time,event) ~ male +
+                   hf(myX, sind = sind2, s.transform = "s/t", dbug=TRUE,
+                      bs="pb", xt="linear"),
+                 data=data5)
 Error in UseMethod("smooth.construct") : 
  no applicable method for 'smooth.construct' applied to an object of class "pb.smooth.spec" 
9 smooth.construct(object, dk$data, dk$knots) 
8 smooth.construct3(object, data, knots) 
7 smoothCon(eval(as.call(newcall)), data = evaldat, knots = NULL, 
    absorb.cons = TRUE) at pcoxTerm.R#135
6 pcoxTerm(data, limits, linear, tv, basistype, sind, integration, 
    standardize, s.transform, t.transform, basisargs, method, 
    eps, smooth, s0, t0, t) at create.tt.func.R#136
5 (tt[[i]])(mf[[timetrans$var[i]]], Y[, 1], strats, weights) 
4 coxph(formula = Surv(time, event) ~ male + tt(s(myX.smat, myX.tmat, 
    by = myX.LX)), data = pcoxdata, x = TRUE, tt = tt.funcs, 
    na.action = function (object, ...) 
    object, iter.max = 100, outer.max = 50) 
3 eval(expr, envir, enclos) 
2 eval(newcall) at pcox.R#252
1 pcox(Surv(time, event) ~ male + hf(myX, sind = sind2, s.transform = "s/t", 
    dbug = TRUE, bs = "pb", xt = "linear"), data = data5) 
jgellar commented 9 years ago

You closed this issue... does that mean you've fixed the errors? If not I will look into them.

Just at a quick glance, the third one is because I move the "pb" basis constructer to mgcvTrans (see a note in a previous issue).