visuEq | R Documentation |
Displays the model equations for a polynomial model
which description is provided as a matrix K
, each column
corresponding to one equation. The coefficients of the polynomial
terms are given following the order defined by function poLabs
.
The matrix can also be provided in a list K
,
in this case, the matrix should be located in K$model[[selecmod]]
where selecmod should be provided as input parameter.
visuEq(
K,
nVar = NULL,
dMax = NULL,
dMin = 0,
substit = 0,
approx = FALSE,
selecmod = NULL
)
K |
A matrix providing the model description:
each column corresponds to one equation which polynomial organisation
is following the convention defined by function |
nVar |
The number of variables |
dMax |
The maximum degree allowed in the formulation |
dMin |
The minimum negative degree of the polynomial formulation (0 by default). |
substit |
Applies subtitutions to the default values:
for |
approx |
The number of extra digits to be used:
for |
selecmod |
An integer providing the number in the sublist when the model matrix is provided in a list. Should not be provided (or NULL) if the model matrix is provided directly. |
N A list of Nvar elements presenting a set of equtions, each equation being an element of this list and written as a character strings
Sylvain Mangiarotti
#EQUATIONS VISUALISATION
# number of variables:
nVar <- 3
# maximum polynomial degree:
dMax <- 2
# polynomial organization:
poLabs(nVar,dMax)
# model construction
KL = matrix(0, ncol = 3, nrow = 10)
KL[1,1] <- KL[2,2] <- 1
KL[4,1] <- -1
KL[5,3] <- -0.123456789
# Equations visualisation:
# (a) by default, variables names X1, X2, X3 are used
visuEq(KL, nVar, dMax)
# (b) for susbstit=1, variables names x, y, y are used instead
visuEq(KL, nVar, dMax, approx = TRUE, substit=1)
# (c) the name of the variables can also be chosen manualy
visuEq(KL, nVar, dMax, approx = 3, substit=c('U', 'V', 'W'))
# A canonical model can be provided as a single vector
polyTerms <- c(0.2,0,-1,0.5,0,0,0,0,0,0)
visuEq(polyTerms, 3,2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.