| To: | s-news@lists.biostat.wustl.edu |
|---|---|
| Subject: | model.tables |
| From: | Pravin Jadhav <pravinj@gmail.com> |
| Date: | Wed, 18 Jan 2006 19:51:21 -0500 |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=SsdgkOBQyvOMbIF4fJVHZmMbBc9U3sgJ5I9ZadbRQu4FeR76YvYUMM7+Rjv2IcPhRCvrgWaf0AVqvXph8HINGpIqE64YlDwC5g2u1jeL+3SOi9gWiZGVZi2RhIXi17U6/O6rJmBRUhY8qrjXHx5HOcW3HhiWLHS7UVNSZa0LvN0= |
|
I am conducting a simple univariate analysis of a repeated measures design. Where the response for each subject is measured at 3 visits. Here is a simplified version of the data and the model.
>test<-data.frame(id=factor(rep(1:20,each=3)),time=factor(rep(1:3,20)),istrt=factor(rep(c(0,1),each=30)),resp=rnorm(60,10,2)) #20 subjects, 3 time points per subject
>test$resp<-ifelse(rnorm(60,0,1)>rnorm(60,0.7,0.7), "NA", test$resp) # missing data (created empirically here)
>test1<-test[test$resp!="NA",]
>summary(aov(resp~time+istrt+Error(id), data="" #No interaction term between time and treatment
The results of this analysis seem reasonable.
Then, I was interested in obtaining the fitted means, I tried the following
>model.tables(aov(resp~time+istrt+Error(id), data="" type="means")
It gives the following error when the data are unbalanced. As I understand from the documentation, When type="effects" or type="means", the design must be balanced for standard errors to be computed. But I am NOT asking for se estimates at all. Please help!
Problem in print.array: No data to interpret as logical value: if(length(dn[[i]]) < d[i]) dn[[i]] <- paste(1:d[i]) Use traceback() to see the call stack > traceback() 11: eval(action, sys.parent()) 10: doErrorAction("Problem in print.array: No data to interpret as logical value: if(length(dn[[i]]) < d[i]) dn[[i]] <- paste(1:d[i])", 9: print.array(x, digits = digits, NA.fill = NA.fill, NaN.fill = NaN.fill, quote 8: print.table(ctable, digits = digits, NA.fill = NA.fill, NaN.fill = NaN.fill) 7: print(ctable, digits = digits, NA.fill = NA.fill, NaN.fill = NaN.fill) 6: print.tables.aov(yy) 5: print(yy) 4: source(auto.print = auto.print, exprs = substitute(exprs.literal)) 3: script.run(exprs.literal = { 2: eval(_expression_(script.run(exprs.literal = { 1: Thanks,
Pravin
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Fwd: plot.lm Response vs Fitted, Tim Hesterberg |
|---|---|
| Next by Date: | Re: print(summary) used in a function, Prof Brian Ripley |
| Previous by Thread: | plot.lm Response vs Fitted, Thompson, David (MNR) |
| Next by Thread: | Re: model.tables (Revised), Pravin Jadhav |
| Indexes: | [Date] [Thread] [Top] [All Lists] |