Thanks it did the trick. Andrej
-----Original Message----- From: Patrick Burns [mailto:[EMAIL PROTECTED] Sent: Saturday, September 06, 2003 9:01 PM To: [EMAIL PROTECTED] Subject: Re: [R] automatic model specification Does doing as.formula(my.formula) etc. solve your problem? Patrick Burns Burns Statistics [EMAIL PROTECTED] +44 (0)20 8525 0696 http://www.burns-stat.com (home of S Poetry and "A Guide for the Unwilling S User") Andrej Kveder wrote: >Dear listers, > > >I must first say that all the suggestions and help I >got from the list so far was of great help to my work. > >I approach you with another question. Is it possible >to generate an automatic specification of the formula >for lme (or other models in R)? Let me clarify. I'm >using models in a simulation run and can have variable >number of variables in the data. I would like to >generate the formula as a string automaticaly >depending on the data structure. I had something like >this in mind: > >my.formula<-"y~x1+x2+x3" >my.ran<-"~ x1" >d<-groupedData(my.formula | inter, data=d.n.data) >model<-lme(my.formula, data=d, random=my.ran | group) > >I know this doesn't work. The error reports wrong type >for the formula. Is there a way to do this? > >Thanks for all the help and suggestions > >Andrej > >_________ >Andrej Kveder, M.A. >researcher >Institute of Medical Sciences SRS SASA; Novi trg 2, >SI-1000 Ljubljana, Slovenia >phone: +386 1 47 06 440 fax: +386 1 42 61 493 > >______________________________________________ >[EMAIL PROTECTED] mailing list >https://www.stat.math.ethz.ch/mailman/listinfo/r-help > > > > ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
