[R] automatic model specification

Andrej Kveder andrejk at zrc-sazu.si
Sat Sep 6 21:19:52 CEST 2003

Thanks it did the trick.


-----Original Message-----
From: Patrick Burns [mailto:pburns at pburns.seanet.com]
Sent: Saturday, September 06, 2003 9:01 PM
To: andrejk at zrc-sazu.si
Subject: Re: [R] automatic model specification

Does doing


etc. solve your problem?

Patrick Burns

Burns Statistics
patrick at burns-stat.com
+44 (0)20 8525 0696
(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.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 Kveder, M.A.
>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
>R-help at stat.math.ethz.ch mailing list

More information about the R-help mailing list