Scenarios

Consider the following script where outputs are not configured. Then the framework output will be just the graphical output. That is, when the outputs are not chosen by the user, then the framework reports the last line's output as the only default output. Note that the plots are always produced.

## ---------DECLARATION------------

## Variable --> DepVar,IndepVar1,IndepVar2

## Single Value Parameter -->

## Output --> ## --------------------------------

art.mod<-lm(DepVar ~ IndepVar1 + IndepVar2)

art.summ<-summary(art.mod)

coef( art.summ )

art.summ[[ "r.squared" ]]

#do some line plots

#plot()

#form new data.frame object

new.x.datafrme = data.frame(x=seq(from=range(IndependentVariable1)[ 1 ],

to=range( IndependentVariable1)[2],

length=length(DependentVariable)))

#form new regression model

RegModel<-lm(DepVar ~ new.x.datafrme$x + IndepVar2)

#perform some operations on the new data

Plot(RegModel)

In this case, the output window will have a tree containing the components of the 'RegModel' object with the same name as the root node.

Alternatively, you can also put the intended objects name at the last line of the script as:

## ---------DECLARATION------------

## Variable -->

## Single Value Parameter -->

## Output --> RegModel

## --------------------------------

art.mod<-lm(DepVar ~ IndepVar1 + IndepVar2)

art.summ<-summary(art.mod)

coef( art.summ )

art.summ[[ "r.squared" ]]

#do some line plots

#plot()

#form new data.frame object

new.x.datafrme = data.frame(x=seq(from=range(IndependentVariable1)[ 1

],to=range( IndependentVariable1)[2],length=length(DependentVariable)))

#form new regression model

RegModel<-lm(DepVar ~ new.x.datafrme$x +

IndepVar2)

#perform some operations on the new data

Plot(RegModel)

RegModel

Here the output window will show a tree containing the components of the 'RegModel' object, but since the output name was not configured or specified, it will be held under a generic framework name 'OFSAAOutput'

One of the added advantages of configuring the outputs is that one can get more than one object as output as shown in the following script:

## ---------DECLARATION------------

## Variable -->

## Single Value Parameter -->

## Output --> RegModel, art.mod

## --------------------------------

art.mod<-lm(DepVar ~ IndepVar1 + IndepVar2)

art.summ<-summary(art.mod)

coef( art.summ )

art.summ[[ "r.squared" ]]

#do some line plots #

plot()

#form new data.frame object

new.x.datafrme = data.frame(x=seq(from=range(IndependentVariable1)[ 1

], to=range( IndependentVariable1)[2],length=length(DependentVariable)))

#form new regression model

RegModel<-lm(DepVar ~ new.x.datafrme$x +

IndepVar2)

#perform some operations on the new data

Plot(RegModel)

For the above script, the output window will contain trees for both 'RegModel' and 'art.mod'.

Here are the possible scenarios and the respective framework behavior:

  • Case A: When no outputs are specified in the declaration block and outputs are not configured in the Outputs window: The value of the last evaluated expression is returned with the name 'OFSAAOutput' for the model execution.
  • Case B: When no outputs are specified in the declaration block and the Configure Outputs button is clicked:

    All the objects from the script execution environment get listed as a tree with each object as separate nodes. Now you can choose the outputs to be reported. The selected ones will be placed in the declaration block. If you do not select any object as output, then the behavior will be the same as case A, for the model execution.

  • Case C: Some objects are declared as outputs in the declaration block either by explicitly writing the correct names in the declaration block against the label Outputs or by right-clicking a valid object name and selecting it as output:

    Now, only those which are listed in the declaration block will come in the Configure Outputs window (as checked ones, since you have already selected them as the outputs explicitly).