<!doctype s-function-doc system "s-function-doc.dtd" [
<!entity % S-OLD "INCLUDE">
]
>
<s-function-doc>
<s-topics>
   <s-topic>add1.lmRob</s-topic>
</s-topics>
<s-title>
Add Terms to a Robust Linear Model Object 
</s-title>
<s-description>
<s-expression>add1.lmRob</s-expression> is used to investigate an <s-expression>lmRob</s-expression> object by adding to it, in 
turn, each of a number of specified terms. 
</s-description>
<s-usage>
<s-old-style-usage>
add1.lmRob(object, scope=. ~ ., scale, keep, x=NULL, ...) 
</s-old-style-usage>
</s-usage>
<s-args-required>
<s-arg name="object">
an <s-expression>lmRob</s-expression> object. 
</s-arg>
<s-arg name="scope">
a <s-expression>formula</s-expression> object describing the terms to be added. This argument is  
required, and is parsed to produce a set of terms that may be added to the  
model on their own without breaking the hierarchy rules. The <s-expression>scope</s-expression> can also  
be a character vector of term labels. Any <s-expression>"."</s-expression> in <s-expression>scope</s-expression> is interpreted  
relative to the formula implied by the <s-expression>object</s-expression> argument. 
</s-arg>
</s-args-required>
<s-args-optional>
<s-arg name="scale">
an estimate of the scale of the residuals. If not supplied, the initial  
estimate of the scale in <s-expression>object</s-expression> is used. 
</s-arg>
<s-arg name="keep">
a character vector of names of components that should be saved for each  
augmented model. Only names from the set <s-expression>"coefficients"</s-expression>, <s-expression>"fitted"</s-expression> and  
<s-expression>"residuals"</s-expression> are allowed. If <s-expression>keep</s-expression> is <s-expression>TRUE</s-expression>, the complete set is implied.  
The default behavior is not to keep anything. 	 
</s-arg>
<s-arg name="x">
a model matrix that includes all the terms in <s-expression>object</s-expression> as well as all those  
to be added.  
</s-arg>
</s-args-optional>
<s-value>
if <s-expression>keep</s-expression> is missing, an <s-expression>anova</s-expression> object corresponding to each superset model  
implied by <s-expression>object</s-expression> and <s-expression>scope</s-expression>; otherwise, a list with components: 
<s-return-component name="anova">
an <s-expression>anova</s-expression> object corresponding to each superset model implied by <s-expression>object</s-expression>  
and <s-expression>scope</s-expression>. 
</s-return-component>
<s-return-component name="keep">
a matrix of mode <s-expression>"list"</s-expression>, with a column for each superset model, and a row  
for each component kept. 
</s-return-component>
</s-value>
<s-details>
An <s-expression>anova</s-expression> object is constructed, consisting of the term labels, the degrees  
of freedom, and Robust Final Prediction Errors (RFPE) for each superset  
model.  
<br><br>
This function is a method for the generic function <s-expression>add1</s-expression> for class  
<s-expression>"lmRob"</s-expression>. It can be invoked by calling <s-expression>add1</s-expression> for an object of the  
appropriate class, or directly by calling <s-expression>add1.lmRob</s-expression> regardless of the  
class of the object.  
</s-details>
<s-see>
<s-function name="add1.sgm">add1</s-function>,  <s-function name="anova.sgm">anova</s-function>,  <s-function name="drop1.sgm">drop1</s-function>,  <s-function name="lmRob.object.sgm">lmRob.object</s-function>.   </s-see>
<s-examples>
<s-example type = text>
stack.df &lt;- data.frame(Loss=stack.loss,stack.x) 
stack.rob &lt;- lmRob(Loss~Water.Temp+Acid.Conc., data=stack.df, 
                   robust.control=lmRob.robust.control(final="MM")) 
add1(stack.rob, .~.+Air.Flow) 
</s-example>
</s-examples>
<s-keywords>
<s-keyword>robust</s-keyword>
<s-keyword>regression</s-keyword>
<s-keyword>models</s-keyword>
<s-keyword>librobust</s-keyword>
</s-keywords>
<s-docclass>
function
</s-docclass>
</s-function-doc>
