rs2: Two-factor Box-Tidwell Nonlinear Response Surface Models

View source: R/rs.r

rs2R Documentation

Two-factor Box-Tidwell Nonlinear Response Surface Models

Description

rs2 fits a two-covariate power-transformed response surface by iterating the function, glm.

Usage

rs2(
  y,
  x1,
  x2,
  power = c(1, 1),
  weight = rep(1, length(x1)),
  family = gaussian,
  iterlim = 20
)

Arguments

y

Response variable

x1

First covariate

x2

Second covariate

power

Initial estimates of the two power transformations

weight

Weight vector

family

glm family

iterlim

Iteration limit

Value

A list of class, rs, is returned containing the model and the power estimates.

Author(s)

J.K. Lindsey

See Also

lm, glm, gnlr, gnlr3, rs3

Examples


x1 <- rep(1:4,5)
x2 <- rep(1:5,rep(4,5))
y <- rpois(20,1+2*sqrt(x1)+3*log(x2)+4*x1+log(x2)^2+2*sqrt(x1)*log(x2))
rs2(y, x1, x2, family=poisson)


gnlm documentation built on June 8, 2025, 11:32 a.m.

Related to rs2 in gnlm...