search for: sample_size

Displaying 20 results from an estimated 22 matches for "sample_size".

Did you mean: sample_sizes
2016 Apr 06
0
R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]
...like this in R as you are missing close braces and haven't really worked out the difference between the number of calculations you are doing for each replication and the number of replications. It takes 5-10 minutes to run. ## Put the samples sizes into matrix then use a loop for sample sizes sample_sizes<- matrix(c(10,10,10,25,25,25,25,50,25,100,50,25,50,100,100,25,100,100), nrow=2) #create vector to combine all std deviations sds<-c(4,6,8,10,12,14) # this number is needed below nsds<-length(sds) set.seed(8) #number of simulations nSims<-10000 #set significance level,alpha for the...
2016 Apr 06
0
R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]
...sing close braces and haven't really worked out the > difference between the number of calculations you are doing for each > replication and the number of replications. It takes 5-10 minutes to > run. > > ## Put the samples sizes into matrix then use a loop for sample sizes > sample_sizes<- > matrix(c(10,10,10,25,25,25,25,50,25,100,50,25,50,100,100,25,100,100), > nrow=2) > > #create vector to combine all std deviations > sds<-c(4,6,8,10,12,14) > # this number is needed below > nsds<-length(sds) > set.seed(8) > > #number of simulations > n...
2008 Aug 26
1
Dramatic slowdown of R 2.7.2?
...land.1250;LC_NUMERIC=C;LC_TIME=Polish_Poland.1250 # #attached base packages: #[1] stats graphics grDevices utils datasets methods base ################################################ The following code has been executed (with both R 2.7.1 and R 2.7.2): Rprof(tmp <- tempfile()) sample_size=10 f1=function(k) {solve(matrix(rnorm(4*k^2),2*k,2*k))} out=vector(,sample_size) for (i in 1:sample_size) {out[i]=system.time(f1(10^3))[[3]]} summaryRprof(tmp) out_summary=matrix(,1,6,dimnames=list("value",c("dim","min","mean","med","sd",&...
2016 Apr 05
0
R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]
Okay, here is a more complete example: sample_sizes<- matrix(c(10,10,10,25,25,25,25,50,25,100,50,25,50,100,100,25,100,100), nrow=2) # see what it looks like sample_sizes ssds<-c(4,4.4,5,6,8) nssds<-length(ssds) results<-list() # first loop steps through the sample for(ss in 1:dim(sample_sizes)[2]) { # get the two sample sizes ss1&lt...
2016 Apr 17
2
R [coding : do not run for every row ]
...<-matrix(0,nrow=nSims,ncol=3) matrix5_unequal<-matrix(0,nrow=nSims,ncol=3) matrix8_mann <-matrix(0,nrow=nSims,ncol=3) # to ensure the reproducity of the result #here we declare the random seed generator set.seed(1) ## Put the samples sizes into matrix then use a loop for sample sizes sample_sizes<-matrix(c(10,10,10,25,25,25,25,50,25,100,50,25,50,100,100,25,100,100), nrow=2) #shape parameter for both gamma distribution for equal skewness #forty five cases for each skewness!! shp<-rep(16/9,each=5) #scale parameter for sample 1 #scale paramter for sample 2 set as constant 1 scp1<-c...
2016 Apr 18
0
R [coding : do not run for every row ]
...rix5_unequal<-matrix(0,nrow=nSims,ncol=3) > matrix8_mann <-matrix(0,nrow=nSims,ncol=3) > > # to ensure the reproducity of the result > #here we declare the random seed generator > set.seed(1) > > ## Put the samples sizes into matrix then use a loop for sample sizes > sample_sizes<-matrix(c(10,10,10,25,25,25,25,50,25,100,50,25,50,100,100,25,100,100), > nrow=2) > > #shape parameter for both gamma distribution for equal skewness > #forty five cases for each skewness!! > shp<-rep(16/9,each=5) > > #scale parameter for sample 1 > #scale paramter for...
2010 Nov 15
2
Need help with pointLabels()
...e? Here is the code I am using. BTW, I have also tried ggplot2 but it has no function (that I am aware of) like pointLabels() to avoid label overlap. Please feel free to email me directly. postscript(file="fig_a.eps"); plot(x, y, xlab="X-axis", ylab="Y-axis", cex=0.02*sample_size, pch=21); abline(lm(y~x, weight=sample_size)) pointLabel(x, y, labels=Category, cex=1, doPlot=TRUE, offset=2.5); dev.off() Thank you, -craig.starger@gmail.com [[alternative HTML version deleted]]
2016 Apr 18
3
R [coding : do not run for every row ]
...rix5_unequal<-matrix(0,nrow=nSims,ncol=3) > matrix8_mann <-matrix(0,nrow=nSims,ncol=3) > > # to ensure the reproducity of the result > #here we declare the random seed generator > set.seed(1) > > ## Put the samples sizes into matrix then use a loop for sample sizes > sample_sizes<-matrix(c(10,10,10,25,25,25,25,50,25,100,50,25,50,100,100,25,100,100), > nrow=2) > > #shape parameter for both gamma distribution for equal skewness > #forty five cases for each skewness!! > shp<-rep(16/9,each=5) > > #scale parameter for sample 1 > #scale paramter for...
2016 Apr 25
2
R: use switch or function in connecting different cases.
...n one code. can anyone give me a brief idea on it. I just managed to write till here and it perhaps isnt correct .. #set up matrix for storing data from simulation matrix_t <-matrix(0,nrow=nSims,ncol=3) matrix_u<-matrix(0,nrow=nSims,ncol=3) matrix_mann <-matrix(0,nrow=nSims,ncol=3) sample_sizes<- matrix(c(10,10,10,25,25,25,25,50,25,100,50,25,50,100,100,25,100,100), nrow=2) p1<-p2<-p3<-vector() nSims<-10 alpha<-0.05 set.seed(1) simulation<-function(m,n,sds) { for (ss in 1:dim(sample_sizes[2])){ m<-[ss,1]...
2016 Apr 05
5
R-dvel [robustness Simulation study of 2 sample test on several combination of factors ]
hi, i am new in this field. do favorite<http://stackoverflow.com/questions/36404707/simulation-study-of-2-sample-test-on-different-combination-of-factors#> If I wish to conduct a simulation on the robustness of two sample test by using R language, is that any ways in writing the code? There are several factors (sample sizes-(10,10),(10,25),(25,25),(25,50),(25,100),50,25),(50,100),
2010 Feb 11
0
Regarding a error while plotting R chart using qcc package.
...ing the error. I am giving the link for the same. > > > http://n4.nabble.com/problems-with-SPC-charts-in-R-td1467901.html#a1469800 > > > > Also I am attaching the dataset and the code which gave me error > while plotting R chart. > > R code is as follows: - > > SAMPLE_SIZE<-1000 > y<-read.csv("data.csv",sep=",",header=TRUE) > y<-subset(y, !is.null(y[,1]),) > unique_b_vals = unique(y[,2]) > final_set <- NULL > for(b_val in unique_b_vals) > { > temp1 = subset(y,week==b_val,) > temp1 = temp1[sample(dim(temp1)[1], S...
2016 Apr 18
0
R [coding : do not run for every row ]
...-matrix(0,nrow=nSims,ncol=3) >>> >>> # to ensure the reproducity of the result >>> #here we declare the random seed generator >>> set.seed(1) >>> >>> ## Put the samples sizes into matrix then use a loop for sample sizes >>> >>> sample_sizes<-matrix(c(10,10,10,25,25,25,25,50,25,100,50,25,50,100,100,25,100,100), >>> nrow=2) >>> >>> #shape parameter for both gamma distribution for equal skewness >>> #forty five cases for each skewness!! >>> shp<-rep(16/9,each=5) >>> >>&gt...
2016 Apr 19
0
problem on simulation code (the loop unable to function effectively)
...uld you give me some advice ? > > #For gamma disribution with equal skewness 1.5 > rm(list=ls()) > nSims<-100 > alpha<-0.05 > > #here we declare the random seed generator > set.seed(3) > > ## Put the samples sizes into matrix then use a loop for sample sizes > sample_sizes<-matrix(c(10,10,10,25,25,25,25,50,25,100,50,25,50,100,100,25,100,100),nrow=2) > > #shape parameter for both gamma distribution for equal skewness > shp<-rep(16/9,each=45) > > #scale parameter for sample 1 > #scale paramter for sample 2 set as constant 1 > d1<-matrix(c...
2016 Apr 18
0
R [coding : do not run for every row ]
...=3) >> matrix8_mann <-matrix(0,nrow=nSims,ncol=3) >> >> # to ensure the reproducity of the result >> #here we declare the random seed generator >> set.seed(1) >> >> ## Put the samples sizes into matrix then use a loop for sample sizes >> >> sample_sizes<-matrix(c(10,10,10,25,25,25,25,50,25,100,50,25,50,100,100,25,100,100), >> nrow=2) >> >> #shape parameter for both gamma distribution for equal skewness >> #forty five cases for each skewness!! >> shp<-rep(16/9,each=5) >> >> #scale parameter for sampl...
2016 Apr 25
0
use switch or function in connecting different cases.
...n one code. can anyone give me a brief idea on it. I just managed to write till here and it perhaps isnt correct .. #set up matrix for storing data from simulation matrix_t <-matrix(0,nrow=nSims,ncol=3) matrix_u<-matrix(0,nrow=nSims,ncol=3) matrix_mann <-matrix(0,nrow=nSims,ncol=3) sample_sizes<- matrix(c(10,10,10,25,25,25,25,50,25,100,50,25,50,100,100,25,100,100), nrow=2) p1<-p2<-p3<-vector() nSims<-10 alpha<-0.05 set.seed(1) simulation<-function(m,n,sds) { for (ss in 1:dim(sample_sizes[2])){ m<-[ss,1]...
2005 Jul 30
1
xyplot auto.key issue
...g my efforts. The function is pasted below; I am making a 3x3 plot, each panel contains 5 lines and it is these lines that I want represented in the key. See the comments for descriptions of the modifications. Any help would be greatly appreciated. Cheers, Mike xyplot( #basic settings bias ~ sample_size | measure, data = bias, groups = exp_tau, type = "b", pch = c(1,2,3,4,5), #make strips transparent strip = function(bg, ...) strip.default(bg = 'transparent', ...), # tweak scales scales=list( x=list( at = c(20, 40, 60), tck = c(1,0), alternating = F ), y=li...
2016 Apr 19
0
problem on simulation code (the loop unable to function effectively)
...l skewness 1.5 >>> rm(list=ls()) >>> nSims<-100 >>> alpha<-0.05 >>> >>> #here we declare the random seed generator >>> set.seed(3) >>> >>> ## Put the samples sizes into matrix then use a loop for sample sizes >>> sample_sizes<-matrix(c(10,10,10,25,25,25,25,50,25,100,50,25,50,100,100,25,100,100),nrow=2) >>> >>> #shape parameter for both gamma distribution for equal skewness >>> shp<-rep(16/9,each=45) >>> >>> #scale parameter for sample 1 >>> #scale paramter for...
2011 Sep 28
0
FLAC::Encoder::Stream == "FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA"
...;FLAC__STREAM_DECODER_READ_FRAME" this is the code I have now /*****************************************************************************/ FLAC__StreamEncoderInitStatus init_status; TMyFlacEncoder enc; bool ok = true; unsigned int sample_size = 4; //2 * (16 / 8); 2 channels * (16 bits / 8) bytes unsigned int samples_per_sector = disc.getBytesPerSector(trackNum) / sample_size / 2 /*channels*/; unsigned int total_samples = trackLength * samples_per_sector; // compress ok &= enc.set_verify(true); ok &a...
2013 Mar 05
1
Reading outdated .Rprofile file
...o.R") source("/Users/simon/Documents/R/functions/residual.stats.R") source("/Users/simon/Documents/R/functions/missings.plot.R") } but then, when I type .First from the command line I get function () { source("/Users/simon/Documents/R/functions/sample_size.R") source("/Users/simon/Documents/R/functions/pseudor2.R") source("/Users/simon/Documents/R/functions/dates.R") source("/Users/simon/Documents/R/functions/andersen.R") source("/Users/simon/Documents/R/functions/tabfun.R") source(&quo...
2003 Mar 26
1
libao alsa output
...o_alsa09.c 2003-03-23 17:30:40.000000000 +0900 @@ -192,18 +192,6 @@ if (err < 0) goto error; - cmd = "snd_pcm_hw_params_set_period_size"; - err = snd_pcm_hw_params_set_period_size(internal->pcm_handle, hwparams, - internal->buf_size / internal->sample_size, 0); - if (err < 0) - goto error; - - cmd = "snd_pcm_hw_params_set_periods"; - err = snd_pcm_hw_params_set_periods(internal->pcm_handle, hwparams, - internal->periods * format->channels, 0); - if (err < 0) - goto error; - cmd = "snd_pcm_hw_params";...