How to construct a partial residual graph of the continuation relation model in R?

I am trying to build a partial residual relation of a continuation model in R.

I am using the 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, this gives me the following error message:

 Warning: 1: In vplot.numeric(x, ...) : ncol(residuals) != ncol(y) so residuals are not plotted 2: In vplot.numeric(x, ...) : ncol(residuals) != ncol(y) so residuals are not plotted 

I don’t understand why this is happening, and I am grateful for any advice on how to fix this ...

I know how to build a partial residual graph using the " rms " package with the residuals.lrm(fit,type="partial",pl=T) command residuals.lrm(fit,type="partial",pl=T) , unfortunately this command will not work with vglm compatible models ...

+4
source share

Source: https://habr.com/ru/post/1494421/


All Articles