[R] Newbie question: Linear regression with error bars.

About this list Date view Thread view Subject view Author view Other groups

Subject: [R] Newbie question: Linear regression with error bars.
From: Alan Aspuru-Guzik (aspuru@okra.cchem.berkeley.edu)
Date: Tue 29 Aug 2000 - 10:44:29 EST


Message-ID: <Pine.LNX.4.10.10008281728230.26605-100000@okra.cchem.berkeley.edu>

Hello guys,
I am a total newbie on R, having downloaded it, read the documentation and
started playing with it right now.

My general question is what 'lr' model can be used for doing a linear
regression on points that have a variance associated with them (ie. Monte
Carlo simulation results).

Actually my Data sets look like:

Timestep Energy Variance_of_the_Energy
0.0005 -14.876840 0.000670
0.001 -14.883960 0.000670
0.002 -14.887360 0.000700
0.05 -14.888730 0.000430
0.1 nan nan

And what I want to do is to obtain the intercept of the best possible
linear fit (weeding out outliers if necessary) but having the intercept
with an associated error bar.

What I managed to do today is read the files from a table and learn how to
access the columns of the data frame . And managed to do a linear
regression of the type x ~ y with normal vectors.

I will eventually will like to use something like the leaps package
(regression subset selection) and then do a linear regression including
the error bars with the best points obtained by the 'leaps' package.

The specific questions are:
x. How can I Convert a data frame's column into a vector?
x. Now that I have the vectors, how can I specify a linear model of a
linear regression with associated variances?

Thanks a lot in advance!!

Alan Aspuru-Guzik

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b25 : Thu 01 Feb 2001 - 16:14:20 EST