similar to: how to generate data set with different length and calculate the mean?

Displaying 20 results from an estimated 10000 matches similar to: "how to generate data set with different length and calculate the mean?"

2010 Jul 23
4
how to calculate the product of every two elements in two vectors
Thanks in advance! A=c(1, 2,3) B=c (9, 10, 11, 12) I want to get C=c(1*9, 1*10, 1*11, 1*12, ....., 3*9, 3*10, 3*11, 3*12)? C is still a vector with 12 elements Is there a way to do that? -- View this message in context: http://r.789695.n4.nabble.com/how-to-calculate-the-product-of-every-two-elements-in-two-vectors-tp2300299p2300299.html Sent from the R help mailing list archive at Nabble.com.
2009 Dec 02
2
calculation problem when export and import data
Hello, I have a question on export and import data. Thank you for any suggestions. data 'simul' is generated as follows: N <- 20 n <- N/2 nsets <- 10 simul <- matrix(0,nsets,N) th <- c(0,1, 1) for(i in 1:nsets){ simul[i,] <- rnorm(N,mean= rep(th[1:2],N/2),sd=th[3]) } I exported data as follows: write.table(simul,
2012 Aug 22
1
(Slight) calculation discrepancy in escalc (metafor package)
Hello, I recently started using the metafor package (version 1.6-0) in R (2.15.1, 64-bit Windows 7) and noticed that I was getting slightly different values when I manually calculated the standardized mean difference versus what escalc was giving me. Here''s a very simple example: escalc(measure="SMD", m1i=5,m2i=10,n1i=5,n2i=5,sd1i=1,sd2i=2,vtype="LS") The result
2010 Feb 18
3
Can R make an usual dotplot
Dear R experts, Can R make an usual dotplot just like Minitab and other softwares? I have the following data, and can use dotchart to graph a dotplot: y=c(2.873438152e-01, -8.732895642e-01, 4.579001889e-01, 1.047395204e+00, 8.491182299e-02 , -1.938007105e+00, -1.273708343e+00, 9.848010588e-05, 7.238490734e-01, -1.490552717e+00) dotchart(y, xlab="10 observations from
2010 Jan 04
3
how to draw abline correctly?
Hello, I am frastruated with this graph, just cannot get what I need. Thank you for any suggestions or help. I really appreciate it. I wrote the following code, but there are 3 problems 1, the red line is added on the graph but without any marker on the y-axis. I want to display the number '.1361' on the y-axis. So people can easily tell 'method 2' gets a constant estimate, which
2018 Jan 30
0
Simulation based on runif to get mean
On 1/29/2018 9:03 PM, smart hendsome via R-help wrote: > Hello everyone, > I have a question regarding simulating based on runif.? Let say I have generated matrix A and B based on runif. Then I find mean for each matrix A and matrix B.? I want this process to be done let say 10 times. Anyone can help me.? Actually I want make the function that I can play around with the number of simulation
2012 Dec 17
2
calculate a "rolling mean" including standard deviation
Hello everyone, I have a data frame somewhat like this one: myframe <- data.frame (Timestamp=c( "24.09.2012 06:00", "24.09.2012 07:00", "24.09.2012 08:00", "24.09.2012 09:00", "24.09.2012 10:00", "24.09.2012 11:00", "24.09.2012 12:00",
2004 Mar 29
1
calculate length of gradient ?
Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on hypatia.math.ethz.ch X-Spam-Level: **** X-Spam-Status: No, hits=4.2 required=5.0 tests=MSGID_FROM_MTA_HEADER,RCVD_IN_BL_SPAMCOP_NET autolearn=no version=2.63 Dear r-help list, my question is about ordination technics:
2009 Dec 04
2
how to seperate a matrix
Hello, I am working on seperate the matrix to two matrices but got trouble on doing it. Please give me some suggestions on doing this. Thanks a looooooooooooot! My original matrix m is as follows for example, [,1] [,2] [,3] [1,] 6 8 1 [2,] 5 9 2 [3,] 20 10 3 [4,] 7 11 4 [5,] 8 12 5 [6,] 25 13 6 [7,] 14 14 7 I want to generate two
2018 Jan 30
2
Simulation based on runif to get mean
Hello everyone, I have a question regarding simulating based on runif.? Let say I have generated matrix A and B based on runif. Then I find mean for each matrix A and matrix B.? I want this process to be done let say 10 times. Anyone can help me.? Actually I want make the function that I can play around with the number of simulation process that I want. Thanks. Eg: a <- matrix(runif(5,1, 10))
2018 Jan 30
1
Simulation based on runif to get mean
Hello, Another way would be to use ?replicate and ?colMeans. set.seed(2511) # Make the results reproducible fun <- function(n){ f <- function(){ a <- runif(5, 1, 10) b <- runif(5, 10, 20) colMeans(cbind(a, b)) } replicate(n, f()) } fun(10) Hope this helps, Rui Barradas On 1/30/2018 8:58 AM, Daniel Nordlund wrote: > On 1/29/2018
2008 Oct 22
2
Calculating confidence limits for the difference between means
Colleagues, I am working on a problem at the edge of my knowledge of statistics. Basically, I have values for two groups - I am trying to calculate the 90% confidence limits for the difference between means. I can implement this without difficulty based on standard equations that are available in stat textbooks: (difference between means) / (pooled standard error) My problem arises
2004 Aug 31
2
limit the length of extensions
How do I limit the length of an extension? In my test IVR/Automated Attendant (whatever it's called), at the beginning it plays "if you know your parties 3 digit extension, you may enter it now) and then it gives a list of options. If the caller puts the 3 digit extension, it goes through fine, if they press 1, or 2 it goes to the selected menu option, but if they dial 91235551212 it
2009 Dec 04
1
how to calculate covariance matrix in R? why cov doesn't work
Hello, Sorry. It may be a stupid question. I have two vectors a<-c(9,3,5) b<-c(3,4,1) How can I get the variance-covariance matrix of these two vectors? I tried cov(a,b), I got a number not a matrix. I tried to transpose vector a and b as t(a) and t(b), it still cannot work. Any suggestions? Thank a lot! -- View this message in context:
2010 May 26
2
How to calculate mean of means
I have 3 columns of numbers, and i want to find the mean of each separately, and then the mean of all of the means. ive tried: av3daysB<- mean(mean(avr1), mean(avr2), mean(avr3)) av3daysB but it only gives me the mean of the first column (avr1) Any suggestions? Thanks, Emilija
2010 Nov 12
1
calculate variance with trimm mean
Dear All I have problem about calculte variance use R. I use trimm mean by mean(x, trim=.05) and I want to calculate variance with trimm=.05. How I can do this. Many Thanks. Jumlong -- Jumlong Vongprasert Assist, Prof. Institute of Research and Development Ubon Ratchathani Rajabhat University Ubon Ratchathani THAILAND 34000 [[alternative HTML version deleted]]
2011 Aug 17
0
How to calculate residual mean deviance in rpart
Hi, I am doing a regression tree using the package 'rpart' but could not able to calculate the residual mean deviance. Please help. Narayan [[alternative HTML version deleted]]
2012 May 31
0
function to calculate a SMAPE (Symmetric mean absolute percentage error) to avoid the possibility of an inflation caused by zero values in the series
Dear Reseacher, i find this modified version of SMAPE at pag 13 formula "msSMAPE" to to avoid the possibility of an inflation caused by zero values in the series using a Si component in the denominator of the symmetric MAPE http://www.stat.iastate.edu/preprint/articles/2004-10.pdf I wrote a function but I wish eventually correct error, change or improve with your suggestions. Please
2004 Dec 05
1
how to calculate "conditional" mean?
a data set like this: year month day count 2001 1 1 10 2001 1 2 11 .... 2004 7 17 8 .... basically it is a count of of some numbers everyday through a few years now I'd like to get the mean of the count for every day. I thought I can do this using for and ifelse, but is there a simple way to do this? I wish a
2007 Aug 28
1
how to calculate mean into a list
Dear Listers: I have this task and suppose a0 is a list of 10 data.frames, I want to calculate like this > (a0[[1]]+a0[[2]]+..+a[[10]])/10 Thanks. -- Weiwei Shi, Ph.D Research Scientist GeneGO, Inc. "Did you always know?" "No, I did not. But I believed..." ---Matrix III