Displaying 2 results from an estimated 2 matches for "dataslice".
Did you mean:
datasize
2010 Apr 27
3
Problem calculating multiple regressions on a data frame.
...me error message)
I have also tried to follow the approach suggested by Charles Sharpsteen
(http://www.mail-archive.com/r-help@r-project.org/msg74759.html) with
similar results.
The code is as follows:
theModels <- by( theTestLineal, list( theTestLineal$ids,
zongTestLineal$variable), function( dataSlice ){
linMod <- lm( value ~ seqMonth, data = dataSlice )
# Slope and intercept may be recovered from the output of the coef()
function:
intercept <- coef( linMod )[1]
slope <- coef( linMod )[2]
# The R-Squared value is returned by the summary() function:
rsq <- summary( linMod )[[ '&...
2009 Nov 05
2
Using a by() function to process several regression (lm()) functions
Hello,
Thank you very much for looking at this. I have a "seasonal" user for R. I
teach my undergrads and graduates students statistics using R and often find
myself trying to solve problems to process student collected data in an
efficient way.
In this case, I have a data.frame with multiple observations. These are gas
concentrations in a chamber and are used to measure into rates,