resp_surf: Response surface model

Description Usage Arguments Author(s) Examples

View source: R/resp_surf.R

Description

[Stable]

Compute a surface model and find the best combination of factor1 and factor2 to obtain the stationary point.

Usage

1
2
3
4
5
6
7
8
9
resp_surf(
  .data,
  factor1,
  factor2,
  rep = NULL,
  resp,
  prob = 0.05,
  verbose = TRUE
)

Arguments

.data

The dataset containing the columns related to Environments, factor1, factor2, replication/block and response variable(s).

factor1

The first factor, for example, dose of Nitrogen.

factor2

The second factor, for example, dose of potassium.

rep

The name of the column that contains the levels of the replications/blocks, if a designed experiment was conducted. Defaults to NULL.

resp

The response variable(s).

prob

The probability error.

verbose

If verbose = TRUE then some results are shown in the console.

Author(s)

Tiago Olivoto tiagoolivoto@gmail.com

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
library(metan)
# A small toy example

df <- data.frame(
 expand.grid(x = seq(0, 4, by = 1),
             y = seq(0, 4, by = 1)),
 z = c(10, 11, 12, 11, 10,
       14, 15, 16, 15, 14,
       16, 17, 18, 17, 16,
       14, 15, 16, 15, 14,
       10, 11, 12, 11, 10)
)
mod <- resp_surf(df, x, y, resp = z)
plot(mod)

metan documentation built on Nov. 10, 2021, 9:11 a.m.