How to plot a partial residual plot of a continuation ratio model in R? -
i trying plot partial residual of continuation ratio model in r.
i using following code:
load(url("http://www.produnis.de/r/ordinalsample.rdata")) mydata <- ordinalsample head(mydata) require(vgam) cr <- vglm(mood ~ jobfamily + jobsatisfaction, data=mydata, family=sratio(parallel=t,reverse=f));cr par(mfrow = c(2, 1)) plotvgam(cr,residuals=t) par(mfrow = c(1, 1)) dev.off()
unfortunately, gives me following error message:
warning: 1: in vplot.numeric(x, ...) : ncol(residuals) != ncol(y) residuals not plotted 2: in vplot.numeric(x, ...) : ncol(residuals) != ncol(y) residuals not plotted
i not understand why occurs , thankful advice on how fix it...
i know how plot partial residual plot using "rms
" package command residuals.lrm(fit,type="partial",pl=t)
, unfortunately, command won't work vglm-fitted models...
Comments
Post a Comment