modelProperties
Extract Model Properties from a Model Object

Description

Extracts properties from a model object that are needed by Spotfire's Analytic Models view.

Usage

modelProperties(modelObj, modelName = NULL)

Arguments

modelObj a model object. Currently only models created with: lm, glm with family=binomial, and arbor using method "anova" or "class" are supported.
modelName an optional model name to be used in the output. If NULL, the default of mymodel is used.

Details

This is a utility function called through a data function in Spotfire to collect information when importing a model into Spotfire.
Value
a list of length one containing a a one column data frame called fitSummaryTable with rows:
Responsethe name of the response variable
Predictorsthe names of the predictor variables, tab-delimited
Model Name:the model name
Model Type:the type of model: linear regression, etc
Model:the model formula
Examples
lreg <- lm(Fuel ~ Weight + Disp., data=Sdatasets::fuel.frame)
modelProperties(lreg, modelName="lm model")
## $fitSummaryTable
##               RegressionSummary
## 1                          Fuel
## 2                 Weight\tDisp.
## 3          Model Name: lm model
## 4 Model Type: Linear Regression
## 5  Model: Fuel ~ Weight + Disp.
Package SpotfireStats version 6.0.0-69
Package Index