You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gg_varpro() on a survival varPro::varpro() fit can fail with:
Error: arguments imply differing number of rows: <p>, 0
(e.g. differing number of rows: 12, 0). This is real and not rare on real survival data, even though it does not reproduce on every fit (e.g. pbc across ntree = 50..200 happened to land on the working path during triage). gg_varpro() survival support otherwise works (the varpro vignette renders gg_varpro(v_pbc)), so this is an intermittent failure, not a categorical limitation.
Likely root cause
The cbind/data.frame in the importance reshape (.build_varpro_imp_dfs() → it combines the p variable names with the rows returned by varPro::importance()) gets a 0-row importance table for the failing survival fits. So varPro::importance() is returning an empty result for those survival fits — likely a varPro-side condition (no rules/variables survive the importance pre-filter, or a survival-specific code path).
Tasks (later / dev line)
Find the varPro condition. Build a reproducer (a survival fit where varPro::importance(fit) returns 0 rows), isolate what triggers it, and file upstream with varPro (Lu/Ishwaran) if it's a varPro bug.
Symptom
gg_varpro()on a survivalvarPro::varpro()fit can fail with:(e.g.
differing number of rows: 12, 0). This is real and not rare on real survival data, even though it does not reproduce on every fit (e.g.pbcacrossntree = 50..200happened to land on the working path during triage).gg_varpro()survival support otherwise works (the varpro vignette rendersgg_varpro(v_pbc)), so this is an intermittent failure, not a categorical limitation.Likely root cause
The cbind/
data.framein the importance reshape (.build_varpro_imp_dfs()→ it combines thepvariable names with the rows returned byvarPro::importance()) gets a 0-row importance table for the failing survival fits. SovarPro::importance()is returning an empty result for those survival fits — likely a varPro-side condition (no rules/variables survive the importance pre-filter, or a survival-specific code path).Tasks (later / dev line)
varPro::importance(fit)returns 0 rows), isolate what triggers it, and file upstream withvarPro(Lu/Ishwaran) if it's a varPro bug..build_varpro_imp_dfs()/gg_varpro()and fail gracefully with a clear, specific message (or a sensible fallback) — scoped to the 0-row case, NOT a blanket survival family block. A family block was tried in fix(gg_varpro): clear error on survival fits instead of cryptic cbind #116 and was wrong: it breaks the working survival path and the vignette render (fix(gg_varpro): clear error on survival fits instead of cryptic cbind #116 closed).Context
gg_vimpvsgg_varproside-by-side).dev/ v4.0.0 line.