[R] lm Help!!

Bill Venables venables at acland.qld.cmis.csiro.au
Wed Apr 12 09:42:28 CEST 2000


Kenneth Cabrera risks all by innocently asking:

> How can I calculate the Type III ss, as defined by SAS,
> for a linear regresion?

SAS?  What's that?

More seriously, I resent the implication that SAS sets the de
facto standard for statistical analysis right down to the
terminology.  It's the MicroSoft strategy, precisely.

More helpfully (I suppose) you can fit any linear model using
regression methods.  You can get the explicit model matrix using
the model.matrix() function.  Once you have the model matrix you
can omit any section of it that you wish in a new regression.  If
you understand what "Type III sums of squares" are (other than as
"those things that SAS gives you") this is all you need to know
to calculate them, should you wish to go through with it...

As you will see, you can check the result using

fm <- lm(y ~ .....)
drop1(fm, . ~ .)

but that's an even longer story.

Warning: with factors, use Helmert, sum or poly contrasts, NOT
treatment.

> How can you use apply with a function that have several
> parameters like "plot"?
>

Additional arguments to the function used with apply() may be
supplied as additional (named) arguments to apply() itself.


> Thank you very much.
>
> Kenneth Cabrera
> Unviersidad Nacional de Colombia

--
Bill Venables,      Statistician,     CMIS Environmetrics Project
CSIRO Marine Labs, PO Box 120, Cleveland, Qld,  AUSTRALIA.   4163
Tel: +61 7 3826 7251           Email: Bill.Venables at cmis.csiro.au

Fax: +61 7 3826 7304      http://www.cmis.csiro.au/bill.venables/




-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list