# plotObservedEffects: Plot Observed Values Vs. Each Dimension of the Design Matrix In mlegp: Maximum Likelihood Estimates of Gaussian Processes

 plotObservedEffects R Documentation

## Plot Observed Values Vs. Each Dimension of the Design Matrix

### Description

Constructs multiple graphs, plotting each parameter from the design matrix on the x-axis and observations on the y-axis

### Usage

```plotObservedEffects(x, ...)
```

### Arguments

 `x` an object of class `gp` or a design matrix `...` if x is a design matrix, a vector of observations; if x is of class `gp`, a vector of parameter numbers or parameter names to plot (by default, all parameters will be graphed)

### Details

if `x` is NOT of class `gp` (i.e., `x` is a design matrix), all columns of `x` will be plotted separately against the vector of observations

if `x` is of class `gp`, the specified columns of the design matrix of `x` will be plotted against the the observations

### Note

It is often useful to use this function before fitting the gaussian process, to check that the observations are valid

### Author(s)

Garrett M. Dancik dancikg@easternct.edu

### Examples

```
## create the design and output matrices ##
x1 = kronecker(seq(0,1,by=.25), rep(1,5))
x2 = rep(seq(0,1,by=.25),5)
z = 4 * x1 - 2*x2 + x1 * x2 + rnorm(length(x1), sd = 0.001)

## look at the observed effects prior to fitting the GP ##
plotObservedEffects(cbind(x1,x2), z)

## fit the Gaussian process ##
fit = mlegp(cbind(x1,x2), z, param.names = c("x1", "x2"))

## look at the observed effects of the fitted GP (which are same as above)
plotObservedEffects(fit)

```

mlegp documentation built on March 18, 2022, 5:29 p.m.