similar to: How to combine two loops?

Displaying 20 results from an estimated 1000 matches similar to: "How to combine two loops?"

2012 Jul 07
0
fixed trimmed mean for group
Hello, I haven't found errors in your code. I implemented the test in the paper (the first, fixed symetric mean) and it also gives me zero Type I errors, when alpha = 0.05. Try to see the value of min(pv) or to plot the histogram of 'pv', hist(pv) and you'll see that there are no significant p-values, at that level. Anyway I'll continue to look at it, but my first
2012 Jun 04
1
simulation of modified bartlett's test
Hi, I run this code to get the power of the test for modified bartlett's test..but I'm not really sure that my coding is right.. #normal distribution unequal variance asim<-5000 pv<-rep(NA,asim) for(i in 1:asim) {print(i) set.seed(i) n1<-20 n2<-20 n3<-20 mu<-0 sd1<-sqrt(25) sd2<-sqrt(50) sd3<-sqrt(100) g1<-rnorm(n1,mu,sd1) g2<-rnorm(n2,mu,sd2)
2012 Dec 17
1
seeking a help on if function
Hello r helpers! Below is the whole coding for my programme. Before proceed more further, let me explain for you. First of all, I need to compute trimmed mean. Till that step is ok. Then I need to compute ssdw which is sum of square deviation. If I do equal trimming at both tail of distribution that I chose, I will use the first ssd formulae which is "a". But if I am doing unequal
2012 Jun 14
0
fixed trimmed mean for j-group
Hello...i want to find the empirical rate for type 1 error using fixed trimmed mean. To make it easy, i'm referring to journal given by this website http://www.academicjournals.org/ajmcsr/PDF/pdf2011/Yusof%20et%20al.pdf. I already run the programme and there is no error in it but i got zero for the empirical rate of type 1 error. The empirical rate for the type 1 error given in the journal
2008 Feb 15
1
Questions about EM algorithm
Dear all: Assume I have 3 distributions, x1, x2, and x3. x1 ~ normal(mu1, sd1) x2 ~ normal(mu2, sd2) x3 ~ normal(mu3, sd3) y1 = x1 + x2 y2 = x1 + x3 Now that the data I can observed is only y1 and y2. It is easy to estimate (mu1+m2), (mu1+mu3), (sd1^2+sd2^2) and (sd1^2+sd3^2) by EM algorithm since y1 ~ normal(mu1+mu2, sqrt(sd1^2+sd2^2)) and y2 ~ normal(mu1+mu3, sqrt(sd1^2+sd3^2)) However, I want
2014 Feb 27
1
Join Samba4 member server to Windows AD
Hello everybody, I need to setup a Domain/subdomain environment with Windows AD. All the DCs run Windows Server 2012 R2. All domains (root and subdomains) The forest and domain functional level are set to Windows 2008 R2. I want to use Samba 4 server as fileservers in these domains, but up to now I have trouble adding Samba 4 member servers to Windows AD. My test environment is made of 2
2013 Feb 01
2
How does this function print, why is n1 which equals 1 printed as 2?
Windows 7, R 2.12.1 Colleagues, I am trying to understand the n.for.2means function. The code below is a copy of the function (renamed to n.for.2means.js). I have inserted a single line of code towards the bottom of the function which uses the cat function to print the value of n1. You will note the value (preceded by stars) is printed as 1. The function (1) prints a lot of output without any
2011 Jan 10
2
Calculating Portfolio Standard deviation
Dear R helpers I have following data stocks <- c("ABC", "DEF", "GHI", "JKL") prices_df <- data.frame(ABC = c(17,24,15,22,16,22,17,22,15,19),                                          DEF = c(22,28,20,20,28,26,29,18,24,21),                                           GHI = c(32,27,32,36,37,37,34,23,25,32),                                          
2005 Jan 08
2
Does R accumulate memory
Dear List: I am running into a memory issue that I haven't noticed before. I am running a simulation with all of the code used below. I have increased my memory to 712mb and have a total of 1 gb on my machine. What appears to be happening is I run a simulation where I create 1,000 datasets with a sample size of 100. I then run each dataset through a gls and obtain some estimates. This works
2006 Nov 24
1
barplot help needed
hello, I would like to create the following barplot: I have 4 different data sets (same length + stddev for each data point) data1 sd1 data2 sd2 data3 sd3 data4 sd4 now, I'd like to plot in the following way: data1[1],data2[1],data3[1],data4[1] with it's sd-values side-by-side at one x-axis label (named "position 1") and each bar in different colors.
2004 Sep 16
3
Estimating parameters for a bimodal distribution
For several years, I have been using Splus to analyze an ongoing series of datasets that have a bimodal distribution. I have used the following functions, in particular the ms() function, to estimate the parameters: two means, two standard deviations, and one proportion. Here is the code I've been using in S: btmp.bi <- function(vec, p, m1, m2, sd1, sd2) {
2010 Nov 23
1
Barplot and plot means with confidence intervals in the same plot
I want to obtain a barplot with error bars and a mean plot with error bars with other scale on the left in the same plot. I need help to get the same x axis (centered) when overlay two plots (barplot2 and plotCI (or lineplot.CI) with errorbars), with diferent y axis. I use par (new=T) but the X axis names are not centered with the figures. An example of my data:
2010 Jul 18
2
loop troubles
Hi all, I appreciate the help this list has given me before. I have a question which has been perplexing me. I have been working on doing a Bayesian calculating inserting studies sequentially after using a non-informative prior to get a meta-analysis type result. I created a function using three iterations of this, my code is below. I insert prior mean and precision (I add precision manually
2002 Mar 01
3
Power of t-test in R vs. S-PLUS
Dear all, I found a discrepancy while performing a power calculation for a two sample t-test in R and S-PLUS, respectively. For given values of sample number (5 each), sd (0.2) , significance level (0.01), and a desired power (80%) I looked for the difference in means. These values differ: 0.5488882 in R and 0.4322771 in S-PLUS (see dump below). Did I overlook any detail or confuse some
2006 Jul 25
1
Multiple tests on repeated measurements
Dear R-helpers: My question is how do I efficient and valid correct for multiple tests in a repeated measurement design: Suppose we measure at two distinct visits with repeated subjects a treatment difference on the same variable. The treatment differences are assessed with a mixed model and adjusted by two methods for multiple tests: # 1. Method: Adjustment with library(multcomp)
2011 Nov 11
1
Fwd: Use of R for VECM
----- Forwarded Message ----- From: vramaiah at neo.tamu.edu To: "bernhard pfaff" <bernhard.pfaff at pfaffikus.de> Sent: Friday, November 11, 2011 9:03:11 AM GMT -06:00 US/Canada Central Subject: Use of R for VECM Hello Fellow R'ers I am a new user of R and I am applying it for solving Bi-Variate (Consumption and Output) VECM with Co-Integration (I(1)) with three lags on
2009 Jan 27
1
Problem with RMA using limma, oligo and pdInfoBuilder packages
Hi, I am a Ph.D. student from Québec, Canada. I’m a beginner with R and Bioconductor. Until now the only experience I have is in analyzing microarray data using affy and limma packages. Now I am trying to analyze Rat Gene 10 st arrays and I would like to run RMA analysis and Smyth moderated t test on those arrays. Since no cdf official package is available for those arrays, after reading many
2007 Nov 17
11
slog tests on read throughput exhaustion (NFS)
I have historically noticed that in ZFS, when ever there is a heavy writer to a pool via NFS, the reads can held back (basically paused). An example is a RAID10 pool of 6 disks, whereby a directory of files including some large 100+MB in size being written can cause other clients over NFS to pause for seconds (5-30 or so). This on B70 bits. I''ve gotten used to this behavior over NFS, but
2008 Feb 28
1
calculate sd for each row on some columns of a dataframe
Hi, I've got a dataframe like this: df = data.frame(a=rnorm(100,1),b=rnorm(100,10),c=rnorm(100,100),d=rnorm(100,-100)) and I want to calculate sd1 for (a,b,c) for each entry, and sd2 for (b,c,d) for each entry. I don't seem to find the answer using aggregate or apply, How can I do this? Thanks in advance, Cheers, Albert.
2011 Nov 29
1
Create an identifier variable
I am needing to create a new identifier variable for a data set which has no ID variable in the original file. I am basically wanting to take the count of each row and add "sd" in front of it - so it would look like so sd1 sd2 sd3 sd4 sd5 etc....... I have no idea how to do this. I am a SAS user trying to learn R. This question may have been answered previously, but I could be