plotInt: Plot 2-way interaction matrix

Description Usage Arguments Examples

View source: R/PlottingFunctions.R

Description

This function takes in an object which is a model from the NLint function and plots the two-way interaction matrix

Usage

1
plotInt(NLmod)

Arguments

NLmod

The fitted model

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
n = 200
p = 10
pc = 1

sigma = matrix(0.3, p, p)
diag(sigma) = 1
X = rmvnorm(n, mean=rep(0,p), sigma = sigma)

C = matrix(rnorm(n*pc), nrow=n)

TrueH = function(X) {
  return(0.5*(X[,2]*X[,3]) - 0.6*(X[,4]^2 * X[,5]))
}

Y = 5 + C + TrueH(X) + rnorm(n)

NLmod = NLint(Y=Y, X=X, C=C)

plotInt(NLmod = NLmod)

jantonelli111/NLinteraction documentation built on Aug. 7, 2020, 10:02 p.m.