formparser: Read the model formula and split it into the parametric and...

View source: R/pgam.r

formparserR Documentation

Read the model formula and split it into the parametric and nonparametric partitions

Description

Read the model formula and split it into two new ones concerning the parametric and nonparametric partitions of the predictor.

Usage

formparser(formula, env=parent.frame())

Arguments

formula

object representing the model formula. R standard for GLM models

parent.frame

an environment to be used as the parent of the environment created

Details

This function extracts all the information in the model formula. Most important, split the model into two parts regarding the parametric nature of the model. A model can be specified as following:

Y~f≤ft(sf_{r}\right)+V1+V2+V3+g≤ft(V4,df_{4}\right)+g≤ft(V5,df_{5}\right)

where sf_{r} is a seasonal factor with period r and df_{i} is the degree of freedom of the smoother of the i-th covariate. Actually, two new formulae will be created:

~sf_{1}+…+sf_{r}+V1+V2+V3

and

~V4+V5

These two formulae will be used to build the necessary datasets for model estimation. Dummy variables reproducing the seasonal factors will be created also.

Models without explanatory variables must be specified as in the following formula

Y~NULL

Value

List containing the information needed for model fitting.

Note

This function is not intended to be called directly.

Author(s)

Washington Leite Junger wjunger@ims.uerj.br

See Also

pgam, f, g


pgam documentation built on Aug. 20, 2022, 1:06 a.m.