Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RGL Embedded Least Squares / ANOVA Plot #22

Open
coatless opened this issue Jul 21, 2016 · 0 comments
Open

RGL Embedded Least Squares / ANOVA Plot #22

coatless opened this issue Jul 21, 2016 · 0 comments

Comments

@coatless
Copy link
Collaborator

Interactive vs. stagnate plots requires use of rgl

To use with rmarkdown, might need to enable hook_webgl()? Need fallback for pdf version. (JS Error)

open3d()
x = rnorm(100)
y = rnorm(100)
z = 0.2*x - 0.3*y + rnorm(100, sd = 0.3)
fit = lm(z ~ x + y)
plot3d(x, y, z, type = "s", col = "red", size = 1)
coefs = coef(fit)
a = coefs["x"]
b = coefs["y"]
c = -1
d = coefs["(Intercept)"]
planes3d(a, b, c, d, alpha = 0.5)

Better version in car::scatter3d:

http://www.inside-r.org/packages/cran/car/docs/identify3d

See:

http://www.ats.ucla.edu/stat/r/dae/intreg.htm

For anova plot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant