Code Monkey home page Code Monkey logo

Comments (5)

sjPlot avatar sjPlot commented on May 16, 2024

I have updated the documentation. Currently, model assumption functions should not return any plot, only the updated model with removed outliers. Perhaps this may be an option for future releases.

from sjplot.

ringprince avatar ringprince commented on May 16, 2024

I am not sure I understand this comment. Removed outliers?

sjp.glm produces a plot -- even if type="vif". The plot just is not returned. I can confirm that the documentation is consistent with the behaviour now. But I'd much prefer to have the ggplot object returned to be able to further tweak it to my needs.

from sjplot.

sjPlot avatar sjPlot commented on May 16, 2024

If you refer to the very last plot of model-assumptions, this is the same one as sjp.glm(fit). type = "ma" first checks the model for outliers, and if there are any, they are being removed and an updated model w/o outliers is re-fitted. This updated glm-object is returned. Set showOriginalModelOnly to FALSE to see plots for both models, original and updated.

from sjplot.

ringprince avatar ringprince commented on May 16, 2024

This is an example what should be possible, I'd say. And easy to achieve. Sorry, should have posted code right in the beginning:

 # prepare dichotomous dependent variable
y <- ifelse(swiss$Fertility < median(swiss$Fertility), 0, 1)

 # fit model
 fitOR <- glm(y ~ swiss$Education + swiss$Examination + swiss$Infant.Mortality + swiss$Catholic,
              family = binomial(link = "logit"))

 sjp.glm(fitOR, type="vif")$plot + theme_bw()

from sjplot.

sjPlot avatar sjPlot commented on May 16, 2024

Sorry for confusion, I was talking about type = "ma", not type = "vif" - my fault... Currently, you can get access to the plot only via last_plot() function from ggplot. I re-open this issue and may add the plot as return value as well to that function.

from sjplot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.