d>
R package You can install the You can install the developmental version of You can draw linear regression models. First model has one
categorical and one continuous explanatory variables. You can draw plot for this model. ggPredict() function draws a
scatterplot with regression line and shows regression equ
Once you have create a model with predict3d(), you can rotate, zoom
in and zoom out your object with your mouse. The second model has two continuous variables as explanatory
variables. You can change the labels and the relative x position and the
y position.
R package predict3d
Keon-Woong Moon
2024-04-05
predict3d
aims to draw predicts plot for
various regression models. The main two functions are ggPredict() for
2-dimensional plot and predict3d() for 3-dimensional plot.Package Install
predict3d
package from CRAN.predict3d
package from github.Linear Regression Models
require(predict3d)
require(rgl)
fit1=lm(Sepal.Length~Sepal.Width*Species,data=iris)
fit1
Call:
lm(formula = Sepal.Length ~ Sepal.Width * Species, data = iris)
Coefficients:
(Intercept) Sepal.Width
2.6390 0.6905
Speciesversicolor Speciesvirginica
0.9007 1.2678
Sepal.Width:Speciesversicolor Sepal.Width:Speciesvirginica
0.1746 0.2110
predict3d(fit1,radius=0.05)
Warning in Ops.factor(diff(y[!is.na(y)][1:2]), 0): '<' not meaningful for
factors
rglwidget(elementId = "1st")