search for: popsize

Displaying 17 results from an estimated 17 matches for "popsize".

Did you mean: opsize
2010 Mar 11
2
Comparing matrices
...totally separate instance/(deep)copy of the data? I tried a few tests that seem to confirm this, but I'd rather be sure. ------- code ------------ # create a binary vector of size "len" create_bin_Chromosome <- function(len) { sample(0:1, len, replace=T) } # create popsize members, each of length len create_pop_2 <- function(popsize, len) { datasize=len*popsize npop <- matrix(0, popsize, len, byrow=T) for(i in 1:popsize) npop[i,] = create_bin_Chromosome(len) npop } POP_SIZE = 3 LEN = 8 pop = create_pop_2(POP_SIZE, LEN) pop2 = pop print(p...
2007 Nov 15
3
Ancova doesn't return test statistics
...ee categorical factors. Plant population growth rate (GR) = dependent variable Seed reduction due to herbivory (SR) = continuous explanatory variable Herbivore species (HS, 2 levels) = categorical explanatory variable Population (Pop, 24 levels) = categorical explanatory variable Population size (Popsize) = continuous explanatory variable Year (Year, 16 levels) = categorical explanatory variable My model is technically simple: model<-aov(GR~SR*HS*Pop*Popsize*Year) However, R is not returning any F and P values ? only Df, Sum Sq and Mean Sq. I have to remove either Year or Pop in order to get...
2009 Apr 26
3
3 questions regarding matrix copy/shuffle/compares
...##################### # create a binary vector of size "len" # create_bin_Chromosome <- function(len) { sample(0:1, len, replace=T) } ############## create_population ################### # create population of chromosomes of length len # the matrix contains twice as much space as popsize # create_pop_2 <- function(popsize, len) { datasize=len*popsize print(datasize) npop <- matrix(0, popsize*2, len, byrow=T) for(i in 1:popsize) npop[i,] = create_bin_Chromosome(len) npop }
2010 Jan 17
2
For loops in R
Hello. I've just started using R and am trying to figure out if the two codes snippets below have the same output gBest<-floor(runif(popsize,min=1,max=top)) velocity[i,j]<<-.4* velocity[i,j] + 1 * runif(1) * (pbestsVar[i,j] - popVar[i,j]) + 1 * runif(1) * (archiveVar[gBest,j] - popVar[i,j]) and for (i in 1:popsize) { for (j in 1:maxvar) { gBest<-sample(top,size=1) velocity[i,j]<<-.4* velocity[i,j] + 1 * run...
2015 Sep 09
0
sample.int() algorithms
...quot;n > 1e7" check is needed. I put together some sample code to show the difference in timing letting sample.int() choose the cutoff point versus manually specifying the use of do_sample2(): ### compare times for sample.int() vs internal function sample2() compareSampleTimes = function(popSizeList=c(1e5, 1e6, 1e7, 1e8, 1e9), sampleSizeList=c(10, 100, 1000, 10000), numReplications=1000) { for (sampleSize in sampleSizeList) { for (popSize in popSizeList) { elapsed1 = system.time(replicate(numReplications, sample.int(popSize, sampleSize)))[["elapsed&quo...
2011 Dec 02
1
Error in Genetic Matching
...s:  Error in GenMatch(Tr = Tr, X = X.binarynp, BalanceMatrix = BalanceMatrix.binarynp,  :    GenMatch(): input includes NAs Could you please suggest me correcting the above problem? My GenMatch command is, > gen1 <- GenMatch(Tr = Tr, X = X.binarynp, BalanceMatrix = BalanceMatrix.binarynp, popsize = 1000) Thanking you, Sincerely Yours, Shyam Kumar Basnet SLU, Uppsala Sweden  [[alternative HTML version deleted]]
2007 Oct 01
1
saving and loading complex objects
...t;C://Program Files//R//R-2.5.1//arima//",nn, sep="") pp=paste( "save( x, file=", sQuote(pp),")", sep="" ) eval(parse(text=pp)) } # end of function: SaveObj load( file="C://Program Files//R//R-2.5.1//arima//amex" ) allArima=function( yy, popSize=10, generations=5 ){ nn = names(yy) for( i in 1:dim(yy)[2] ) { print( paste( " iter: ", i, "name: ", " ", names(yy)[i],sep="") ) # data AVY Note lagxy <- CreateColumnSpace( yy, column = i, startLag = 1, endLag = 8...
2009 Sep 09
2
Matrix multiplication and random numbers
Dear All I new to using R and am struggling with some matrix multiplication. I have two matrices, one containing random numbers, these are multiplied together to get another matrix which is different each time. When I put in another for loop to repeat this process a multiple times the matrices are all the same. I?m sure there is a way to keep the randomness of the different matrices but I think
2008 Sep 12
2
Fw: Complex sampling survey _ Use of survey package
-------------------------------------------------- From: "Ahoussou Sylvie" <sylvie.ahoussou at antilles.inra.fr> Sent: Friday, September 12, 2008 9:48 AM To: "Thomas Lumley" <tlumley at u.washington.edu> Subject: Re: [R] Complex sampling survey _ Use of survey package > Thanks for your answer > > I think I made a mistake when I recopied the 5 first rows of
2011 Dec 02
0
Error message in Genetic Matching
...s:  Error in GenMatch(Tr = Tr, X = X.binarynp, BalanceMatrix = BalanceMatrix.binarynp,  :    GenMatch(): input includes NAs Could you please suggest me correcting the above problem? My GenMatch command is, > gen1 <- GenMatch(Tr = Tr, X = X.binarynp, BalanceMatrix = BalanceMatrix.binarynp, popsize = 1000) Thanking you, Sincerely Yours, Shyam Kumar Basnet SLU, Uppsala Sweden [[alternative HTML version deleted]]
2010 Mar 14
1
Segfault Problem c++ R interface (detailed)
..." { unsigned int evaluateSymbReg(std::vector<Tree>& ioPopulation, Context& ioContext, const std::vector<double>& inX, const std::vector<double>& inF); void RSymbReg(SEXP RPopSize, SEXP RNbrGen, SEXP RNbrPartTournament, SEXP RMaxDepth, SEXP RMinInitDepth, SEXP RMaxInitDepth, SEXP RInitGrowProba, SEXP RCrossoverProba, SEXP RCrossDistribProba, SEXP RMutStdProba, SEXP RMutMaxRegenDepth, SEXP RMutSwapProba, SEXP RMutSwapDistribProba, SEXP...
2008 Sep 09
1
survey package
Version 3.9 of the survey package is now on CRAN. Since the last announcement (version 3.6-11, about a year ago) the main changes are - Database-backed survey objects: the data can live in a SQLite (or other DBI-compatible) database and be loaded as needed. - Ordinal logistic regression - Support for the 'mitools' package and multiply-imputed data - Conditioning plots,
2008 Sep 09
1
survey package
Version 3.9 of the survey package is now on CRAN. Since the last announcement (version 3.6-11, about a year ago) the main changes are - Database-backed survey objects: the data can live in a SQLite (or other DBI-compatible) database and be loaded as needed. - Ordinal logistic regression - Support for the 'mitools' package and multiply-imputed data - Conditioning plots,
2004 Sep 04
1
Inconsistencies in subassignment (PR#7210)
I have made the 3-d case do the same as the vector case, which is what the C code clearly intended (a goto label was in the wrong place). This leaves the bigger question of the right thing to do. I note that data frames give an error when any indices are NA. -thomas On Fri, 3 Sep 2004 ripley@stats.ox.ac.uk wrote: > Apart from the inconsistencies, there are two clear bugs here: > > 1)
2012 Aug 09
4
debug vs regular mode
Dear all, I had a R segmentation fault, and then invoked debug mode and ran step by step. When I reached "terms(Y~X1*X2*...*X16)", I would then have "segmentation" fault. However, if I just ran this under regular "R interactive" mode, it would be fine though taking long time. My questions are: 1. Is there a known limit of terms for a formula? 2. Why does the
2012 Aug 09
4
debug vs regular mode
Dear all, I had a R segmentation fault, and then invoked debug mode and ran step by step. When I reached "terms(Y~X1*X2*...*X16)", I would then have "segmentation" fault. However, if I just ran this under regular "R interactive" mode, it would be fine though taking long time. My questions are: 1. Is there a known limit of terms for a formula? 2. Why does the
2009 Sep 27
3
CRAN (and crantastic) updates this week
...EXUS and PHYLIP. Some basic functions have already been established in the package for manipulating trees such as deleting and swapping nodes, rooting and unrooting trees, changing the root of the tree. The package also includes functions such as "consensus", "coaltime, "popsize", "treedist" for summarizing phylogenetic trees, calculating the coalescence time, population size, and tree distance. The function maxtree is built in the package to esimtate the species tree from multiple gene trees. * pooh (0.2) Charles J. Geyer http://crantastic.org/...