Last data update: 2014.03.03

R: Construction of a formula Y~s(X1)+...+s(Xp)
formulaAmR Documentation

Construction of a formula Y~s(X1)+...+s(Xp)

Description

This function constructs a formula based on splines for additive models.

Usage

formulaAm(X,Y)

Arguments

X

a data.frame containing the design of experiments

Y

a vector containing the associated response

Value

an object of class formula.

Note

The names of input variables are used to build the appropriate formula.

Author(s)

D. Dupuy

Examples

data(dataIRSN5D)
X <- dataIRSN5D[,1:5]
Y <- dataIRSN5D[,6]
formulaAm(X,Y)

Results


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(DiceEval)
Loading required package: DiceKriging
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/DiceEval/formulaAm.rd_%03d_medium.png", width=480, height=480)
> ### Name: formulaAm
> ### Title: Construction of a formula Y~s(X1)+...+s(Xp)
> ### Aliases: formulaAm
> ### Keywords: models regression internal
> 
> ### ** Examples
> 
> data(dataIRSN5D)
> X <- dataIRSN5D[,1:5]
> Y <- dataIRSN5D[,6]
> formulaAm(X,Y)
Y ~ s(b) + s(e) + s(p) + s(r) + s(l)
<environment: 0x1542dd8>
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>