Re: [R] help with a loop (coefficients with lmList)

2009-08-09 Thread Gabor Grothendieck
Your data has 2 points per regression for each year in industry 1 and only one point per regression for the other industries so one would expect many NAs: > table(data[c("industry", "year")]) year industry 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 122222

Re: [R] Help with a loop

2008-07-28 Thread Sofia Martinez
HI the code is suppose to generate a random value selected uniformly as a time interval in seconds (that's the dT) from the range given fromdtmin<-969 dtmax<-9884. Once that value is selected the program will generate the interval (ts1, ts2, and so on. for each sampling without getting out o

Re: [R] Help with a loop

2008-07-28 Thread Patrick Burns
You are right to be dissatisfied with your code. I suspect you will get more response if you say what the code is supposed to do, and give a smaller example of what the answer should be. Patrick Burns [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and "A Guide

Re: [R] Help with a Loop

2007-12-03 Thread Gabor Grothendieck
There are three ways listed here: https://stat.ethz.ch/pipermail/r-help/2007-May/132866.html On Dec 2, 2007 5:33 PM, stathelp <[EMAIL PROTECTED]> wrote: > > I am having trouble getting a loop to work for the following problem. Any > help would be much appreciated. Thanks. > > I need to find the sl

Re: [R] Help with a Loop

2007-12-03 Thread Dimitris Rizopoulos
look at function lmList() from package 'nlme', e.g., # say 'dat' is you data.frame library(nlme) fm <- lmList(DrugLevel ~ Day | Participant, data = dat) fm summary(fm) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic