this function plots b[1]x1 + b[2]x2 + b[3]x1*x2 for values over the range of X1 and X2. The highest 75%, 50% and 25% of the bivariate density of X1 and X2 (as calculated by sm.density from the sm package) are colored in with colors of increasing gray-scale.
Value
x1
Values of the first element of varnames used to make predictions.
x2
Values of the second element of varnames used to make predictions.
pred
The predictions based on the values x1 and x2.
graph
A graph is produced, but no other information is returned.
Author(s)
Dave Armstrong (UW-Milwaukee, Department of Political Science)
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(DAMisc)
Loading required package: car
Loading required package: effects
Attaching package: 'effects'
The following object is masked from 'package:car':
Prestige
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DAMisc/DAintfun.Rd_%03d_medium.png", width=480, height=480)
> ### Name: DAintfun
> ### Title: Surface Plots for Two-Way Interactions
> ### Aliases: DAintfun
>
> ### ** Examples
>
> data(InteractionEx)
> mod <- lm(y ~ x1*x2 + z, data=InteractionEx)
> DAintfun(mod, c("x1", "x2"))
Loading required package: rgl
Loading required package: rpanel
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called 'rpanel'
>
> ## Make interactive with:
> # mypanel <- function(panel){
> # DAintfun(mod, c("x1", "x2"), theta=panel$theta, phi=panel$phi)
> # panel}
> # panel <- rp.control(theta=0, phi=25)
> # rp.slider(panel, theta, -360, 360, mypanel, showvalue=TRUE)
> # rp.slider(panel, phi, 0, 90, mypanel, showvalue=TRUE)
>
>
>
>
>
> dev.off()
null device
1
>