Displaying 2 results from an estimated 2 matches for "alltemp".
Did you mean:
alitemp
2001 Mar 16
1
Newbie question about by()
Dear R list:
I want to make separate estimates for each level of the variable "group."
After consulting many sources I am stumped as to why the following does not work:
> wintemp <- subset(alltemp, winner==1)
> my.ppr <- function(x)
+ {
+ if(nrow(x) >= 50) {
+ pprfile <- ppr(award~ilogemp, data=x,nterms=5,max.terms=10,optlevel=3)
+ summary(pprfile)
+ }
+ }
> test.by <- by(wintemp,as.factor(wintemp$group),my.ppr)
Error in model.frame.default(formula = awa...
2001 Mar 20
3
Newbie question about by() -- update
...ontext?
---------------
david.beede at mail.doc.gov wrote:
>
> Dear R list:
>
> I want to make separate estimates for each level of the variable "group."
> After consulting many sources I am stumped as to why the following does
not work:
>
> > wintemp <- subset(alltemp, winner==1)
> > my.ppr <- function(x)
> + {
> + if(nrow(x) >= 50) {
> + pprfile <- ppr(award~ilogemp,
data=x,nterms=5,max.terms=10,optlevel=3)
> + summary(pprfile)
> + }
> + }
> > test.by <- by(wintemp,as.factor(wintemp$group),my.ppr)
&g...