Dear Experts, I need to include the repeated structure in our data set object, recall.sums.df, before using gls function. Thus I used groupedData. But I encountered error messages which may mean '*' is not not meaningful factor. Please let me know what I have to do. Thanks, Jeong> recall.sums.df[0:10, ]recall.values recall.ind subj replication hemi region group 1 17.515 rL_GM_T1 1 1 1 1 1 2 18.830 rL_GM_T1 2 1 1 1 1 3 16.477 rL_GM_T1 3 1 1 1 1 4 20.905 rL_GM_T1 4 1 1 1 1 5 18.005 rL_GM_T1 5 1 1 1 1 6 19.533 rL_GM_T1 6 1 1 1 1 7 17.126 rL_GM_T1 7 1 1 1 1 8 19.910 rL_GM_T1 8 1 1 1 1 9 17.881 rL_GM_T1 9 1 1 1 1 10 21.159 rL_GM_T1 10 1 1 1 1> longs <- groupedData(recall.values~region* hemi* group* replication |subj, data = recall.sums.df) Warning messages: 1: In Ops.factor(region, hemi) : * not meaningful for factors 2: In Ops.factor(region * hemi, group) : * not meaningful for factors 3: In Ops.factor(region * hemi * group, replication) : * not meaningful for factors [[alternative HTML version deleted]]
Dr Shrink wrote:> > I need to include the repeated structure in our data set object, > recall.sums.df, before using gls function. > Thus I used groupedData. > But I encountered error messages which may mean '*' is not not meaningful > factor. >I know that when reading Pinheiro/Bates one has the expression that groupedData is required, but I always found that concept more confusing than helpful (and it has been abandoned in nlm4). Things work much more transparent without grouped data. I suggest that you first the numeric data to factors, e.g. recall.sums.df$subj = as.factor(recall.sums.df$subj) and then try again without using grouped data. However, it looks too me that you might be better of with lme anyway, probably with random= ~1|subj. gls is a very useful and underused tool, but probably not for this data set. I also suggest that you start getting the syntax right with + instead of * first. You model could easily be strongly underspecified, which also lead to nasty error messages. Dieter -- View this message in context: http://r.789695.n4.nabble.com/Warning-messages-not-meaningful-for-factors-tp2527349p2527426.html Sent from the R help mailing list archive at Nabble.com.