Description Usage Arguments Value Author(s) References Examples

This program fits for each dependent variable, a Multiple Linear
Regression model calling the function `step`

for choosing
the best model by AIC criterion, or a Multiple Classification and Regression Trees
model, using the package party.
The summary of the model returns information about
the significance of the models, F-statistics and degrees of freedom,
when is fitted a "mlm"; otherwise, when the model fitted is a "mctree", the summary
returns the plots of those trees with significant splits.

1 2 3 4 5 6 7 8 | ```
eco.lmtree(
df1,
df2,
analysis = c("mlm", "mctree"),
mod.class = "+",
fact = NULL,
...
)
``` |

`df1` |
Data frame with dependent variables as columns. |

`df2` |
Data frame with independent variables as columns. |

`analysis` |
Class of analysis to perform. "mlm" for multiple linear regression analysis, or "mctree" for a multiple classification tree analysis. |

`mod.class` |
"+" for additive model, "*" for model with interaction, in both cases, these models will include all terms in the dependent data frame. If other model than these two is desired, it could be specified as a string with the names of those columns of the independent variable that should be used as terms. This string corresponds to the right side "x" of a formula y ~ x (see examples). |

`fact` |
Optional factor for estimating the frequencies of individuals from different levels in each node, when the analysis performed is "mctree". |

`...` |
Further arguments passed to |

When the analysis selected is "mlm", the output object has three main slots:

> MLM: the results of the model

> SUMMARY.MLM the summary for each variable returned by the `lm`

function

> ANOVA.MLM with the ANOVAs results.

When the analysis selected is "mctree", the output object has also three main slots:

> TREES: Trees returned by the multiple `ctree`

analysis.

> PREDICTIONS: Predictions of the analysis.

> FREQUENCIES: Number of individuals predicted in each node.

**ACCESS TO THE SLOTS**
The content of the slots can be accessed
with the corresponding accessors, using
the generic notation of EcoGenetics
(<ecoslot.> + <name of the slot> + <name of the object>).
See help("EcoGenetics accessors") and the Examples
section below

Leandro Roser learoser@gmail.com

Hothorn T., K. Hornik, and A. Zeileis. 2006. Unbiased Recursive Partitioning: A Conditional Inference Framework. Journal of Computational and Graphical Statistics, 15: 651-674.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | ```
## Not run:
data(eco.test)
# mlm additive model
mod <- eco.lmtree(df1 = eco3[["P"]], df2 = eco3[["E"]],
analysis = "mlm")
mod
summary(mod)
# mctree additive model
mod <- eco.lmtree(df1 = eco3[["P"]], df2 = eco3[["E"]],
analysis = "mctree", fact = eco3[["S"]]$pop)
#-----------------------
# ACCESSORS USE EXAMPLE
#-----------------------
# the slots are accessed with the generic format
# (ecoslot. + name of the slot + name of the object).
# See help("EcoGenetics accessors")
summary(mod)
ecoslot.FREQUENCIES(mod) # slot FREQUENCIES
# frequency table with counts of individuals in populations x terminal nodes
tabfreq <- do.call(cbind, ecoslot.FREQUENCIES(mod))
namestab <- lapply(ecoslot.FREQUENCIES(mod), ncol)
namestab <- lapply(namestab, rep)
namestab <- rep(names(namestab), namestab)
colnames(tabfreq) <- namestab
tabfreq
# mlm custom model
mymod <- "E1+E2*E3"
mod <- eco.lmtree(df1 = eco[["P"]], df2 = eco[["E"]],
analysis = "mlm", mod.class = mymod)
summary(mod)
# mctree custom model
mod <- eco.lmtree(df1 = eco[["P"]], df2 = eco[["E"]],
analysis = "mctree", mod.class = mymod, fact = eco[["S"]]$pop)
summary(mod)
## End(Not run)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.