Displaying 1 result from an estimated 1 matches for "bydd".
Did you mean:
bdd
2011 Aug 24
2
Regression by factor using "sapply"
...quot;by" and "sapply" formula
but I keep getting an error message of: "$ operator is invalid for atomic
vectors"
Here is what I've bee trying to use
# data is stored in a table called "usage"; other than the "ActNo" field,
all the fields are numeric
byDD <- function(data) {lm(AvgKWh~ AvgHDD + AvgCDD, data=data)}
byActNo <- by(usage, usage$ActNo, FUN=byDD)
sapply(byActNo, summary(byActno)$coef)
Thanks in advance! I'm sure a similar question has been covered somewhere
but everytime I follow the message stream I hit a deadend.
--
View thi...