Displaying 5 results from an estimated 5 matches for "groupmean".
Did you mean:
groupman
2009 Dec 08
1
Printing 'k' levels of factors 'n' times each, but 'n' is unequal for all levels ?
...ead.table("P:\\Transit\\CORRECT
files\\Everything-newest.csv",header=T, sep=",", dec=".", na.strings=NA,
strip.white=T)
vcdf<-data.frame(vc)
tempdf<-data.frame(cbind(vcdf[,1:3], vcdf[,429]))
newtemp<-na.exclude(tempdf)
newtemp[,2]<-factor(newtemp[,2])
groupmean<-tapply(newtemp[,4], newtemp[,2], mean)
newmark<-factor(groupmean, exclude=(groupmean==0 | groupmean==1))
newmark
This is what the output is (going up to 61 levels)
1 2 3 4
<NA> 0.142857142857143 0.444444444444444 <...
2004 May 08
3
Getting the groupmean for each person
...group the person belongs to. There is also another variable AV for each
person. Now i want to create a new variable which holds the group mean of AV
as a value for each person.
With tapply(AV,GROUP,mean) i get the means for each level of GROUP, but i
cannot find out, how to give every person the groupmean as a value (every
person should have the same value as every other person in the same group).
Has anybody any ideas how to do that ?
Yours sincerly
Felix Eschenburg
2006 Sep 20
1
Pooled Covariance Matrix
...here must be a simple way to get the within group pooled
covariance matrix but I haven't found it yet.
I started thinking that one might begin by forming a frame with the same
dimensions but containing the group means. But then I found a thread
from two years back called "Getting the groupmean for each person" which
seemed to imply that doing this was a bit subtle even for ncol=1. Hence
I will risk a question to the list.
Thanks for any help, Murray Jorgensen
--
Dr Murray Jorgensen http://www.stats.waikato.ac.nz/Staff/maj.html
Department of Statistics, University of Waika...
2011 Jul 16
1
Fwd: construct boxplots from data with varying column widths
From: David Winsemius <dwinsemius at comcast.net>
On Jul 16, 2011, at 12:15 PM, Rory Campbell-Lange wrote:
> On 16/07/11, David Winsemius (dwinsemius at comcast.net) wrote:
>>
>> On Jul 16, 2011, at 11:19 AM, Rory Campbell-Lange wrote:
>>
>>> I'm an R beginner, and I would like to construct a set of boxplots
>>> showing database function runtimes.
2012 Apr 19
4
Column(row)wise minimum and maximum
Hi,
Currently, the "base" has colSums, colMeans. It seems that it would be useful to extend this to also include colMin, colMax (of course, rowMin and rowMax, as well) in order to facilitate faster computations for large vectors (compared to using apply). Has this been considered before? Please forgive me if this has already been discussed before.
Thanks,
Ravi
Ravi Varadhan, Ph.D.