Skip to content

prePro issue #39

@sammo3182

Description

@sammo3182

From Guan Wang by email

I ran the example based on the mtcars dataset
provided in the R file (https://cran.r-project.org/web/packages/interplot/vignettes/interplot-vignette.html). The two variables in the interaction term are "wt (continuous)" and "vs (binary)". Below is the code:

library(interplot)

data(mtcars)

class(mtcars$vs);table(mtcars$vs)

m_cyl <- glm(am ~ wt * vs, data = mtcars,family = binomial(link = "logit"))
summary(m_cyl)

windows()
plot_1 <- interplot(m_cyl, var1 = "wt",var2 = "vs",
                       predPro = TRUE,
                       var2_vals = c(0,1))
plot_1

windows()
plot_2 <- interplot(m_cyl, var1 = "vs",var2 = "wt",
                    predPro = TRUE,
                    var2_vals = c(min(mtcars$wt),max(mtcars$wt)))
plot_2### 

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions