[SciPy-user] Any SPLUS to scipy ideas for lm and summary(lm)?

Michael Sorich michael.sorich at gmail.com
Mon Apr 10 18:37:20 CDT 2006


On 4/11/06, Webb Sprague <webb.sprague at gmail.com> wrote:
>
> Hi Scipy-ers,
>
> I would like to duplicate the following piece of SPLUS/R code in
> Python-scipy, and would love somebody smarter than me to give me some
> ideas.  (If you don't know SPLUS/R, you may not want to bother with
> this.)
>
> model.kt <- summary(lm(kt.diff ~ 1  ))
> kt.drift <- model.kt$coefficients[1,1]  # Coefficient
> sec <- model.kt$coefficients[1,2]  # Standard Error of the Coefficient
> (SEC)
> see <- model.kt$sigma   # Standard error of the Equation (SEE)
>
> Getting a least-squares fit in scipy is not a problem, but getting all
> that other nice stuff IS kind of a problem.  I don't mind either
> hacking scipy.stats, or writing my own function, but maybe someone has
> some ideas for this, maybe it can be contributed, or ???.  I also
> realize that the SPLUS formula notation doesn't exist at all in
> scipy-Python, so no need to point that out to me.
>
> Perhaps there should be a scipy.stats working group?  It seems like
> scipy.stats (not including the probability distributions and basic
> summary functions, which are fine) is kind of a forgotten stepchild in
> scipy, and probably needs a nurturing aunt or uncle or several....


I don't have anything really useful to say, other than to say that I would
also like a stronger focus on stats in scipy. I typically use R at the
moment but would prefer to use scipy. I find the data.frame data type in
R/Splus particularly helpful for the type of statistical analysis I
undertake (basically something like a masked recarray with ability to have
col and row names). In my spare time I am working on trying to make
something similar for numpy.

Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.scipy.net/pipermail/scipy-user/attachments/20060411/e1b961bd/attachment-0001.htm


More information about the SciPy-user mailing list