At 02:23 29/12/2010, Entropi ntrp wrote:
Hi,
I have been examining large data and need to do simple linear regression
with the data which is grouped based on the values of a particular
attribute. For instance, consider three columns : ID, x, y, and I need to
regress x on y for each distinct val
Thanks alot for the quick responses.
I have some additional questions related to this topic. In fact, my
intention was to be able to answer questions like what percent of the
regressions have p_values less than a certain threshold, how do
residuals look like, how do the plots of y vs. x look like,
Hi:
There are some advantages to taking a plyr approach to this type of problem.
The basic idea is to fit a linear model to each subgroup and save the
results in a list, from which you can extract what you want piece by piece.
library(plyr)
# One of those SAS style data sets...
> df <- data.fram
library(nlme)
lmList(y ~ x | factor(ID), myData)
This gives a list of fitted model objects.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Entropi ntrp
Sent: Wednesday, 29 December 2010 12:24 PM
To: r-help@r-project.org
Subject:
On Dec 28, 2010, at 9:23 PM, Entropi ntrp wrote:
Hi,
I have been examining large data and need to do simple linear
regression
with the data which is grouped based on the values of a particular
attribute. For instance, consider three columns : ID, x, y, and I
need to
regress x on y for ea
5 matches
Mail list logo