search for: means1

Displaying 5 results from an estimated 5 matches for "means1".

Did you mean: means
2006 Feb 01
1
several plots in one
...they have nothing to do with each other. I also tried calling plotCI with argument add=TRUE, which didn't seem to work (that is actually what I wanted I think). (It should look the same as if I called plotCI twice with same labels/xlim/ylim/etc.) plotCI(x = cbind(x1,x2), y = cbind(means1,means2), # means1 == ci1["Estimate",] xlim = c(0,100), #ylim = c(0.2,0.5), ylab = "System welfare", pch = 7, col = c("red","blue"), type = "b", uiw = cbind(uiw1,uiw2)) Thanks in advance, JeeBee.
2011 Jun 28
1
means and error bars on xyplot for binary data
...lt;-sample(gtype,20,replace=TRUE) y<-sample(c(0,1),20,replace=TRUE) bin.data<-data.frame(x,y) xyplot(y~x, jitter.y=TRUE, jitter.x=TRUE,factor=.6, data=bin.data) Then If I wanted to add the means to the plot, I would do this, which will print the mean points on a box plot, but not an xyplot: means1 <- tapply(bin.data$y,bin.data$x,mean) points(means1,col="red",pch=18) Is there a way to get the means, and even error bars on the same xyplot? Thanks for any help in advance, Louis [[alternative HTML version deleted]]
2011 May 12
1
separate date and time
...e a combined date and time. I would like to separate them out into two columns so I can do things such as take the mean by time across all dates. meas<-runif(435) nTime<-seq(1303975800, 1304757000, 1800) nDateT<-as.POSIXct(nTime, origin="1970-01-01") mat1<-cbind(nDateT,meas) means1<- aggregate(mat1$meas, list(nDateT), mean) This doesn't do anything as each day is different, but if I had just the time, it would take the mean outputing 48 values (for each 30 min). Also, sometimes there are missing meas to a specific time. Is there anyway to copy the previous meas if on...
2017 Dec 14
1
Aggregation across two variables in data.table
...Rented 7.496411 My objective is to calculate the average of Theta across all pairs of two demographics. For 1 demographic this is straightforward: Demo_names <- c("Age", "Education", "Marital", "Familysize", "Income", "Housing") means1 <- as.list(rep(0, length(Demo_names))) for (i in 1:length(Demo_names)) { Demo_tmp <- Demo_names[i] means1[[i]] <- data_tmp[,list(mean(Theta)),by=Demo_tmp]} Is there an easy way to extent this logic to more than 1 variable? I know how to do this manually, e.g., data_tmp[,list(mean(Theta)),...
2010 Jan 22
1
confidence intervals for mean (GLM)
...y treatments, when my data was fitted to a GLM? I need the CI's for the Poisson and Negative Binomial distributions. Here's what I have: mydata1 <- data.frame('treatments'=gl(4,20), 'value'=rpois(80, 1)) model1 <- glm(value ~ treatments, data=mydata1, family=poisson) means1 <- with(mydata1, tapply(value, treatments, mean)) now I need the confidence intervals for the means And then again for a negative binomial GLM require(MASS) mydata2 <- data.frame('treatments'=gl(4, 4, 64, LETTERS[1:4]), 'species'=gl(4, 1, 64, letters[1:4]), 'value'=...