[R] Linear Trend Analysis?

Chris Bergstresser chris at subtlety.com
Thu Jan 27 02:08:34 CET 2005


> -----Original Message-----
> From: Tim F Liao [mailto:tfliao at uiuc.edu]
>
>
> In a course I recently taught, I used the
> following code to generate individual data from grouped data,
> which would give the same results as using fweight=count in Stata.
> 
> Ind.Data<-data.frame(cbind(rep(Y,freq),rep(X1,freq),rep(X2,freq)))
> 
> where Y is the dependent variables and X1 and X2 are two
> explanatory variables and freq is your count variable.

   That had occurred to me, but some of the frequencies are around 17,000,
so it seemed there had to be a more elegant way.

-- Chris




More information about the R-help mailing list