search for: subsampl

Displaying 20 results from an estimated 192 matches for "subsampl".

Did you mean: subsample
2003 Feb 12
1
Na/NaN error in subsampling script
...rs, I''m having a problem with an R script (see below), which regularly generates the error message, Error in start:(start + (sample.length - 1)) : NA/NaN argument , for which I am unsure of the cause. In essence, the script (below) generates the start and end points for random subsamples from along a vector (in reality a transect (of a given length, sample.length), that may be used to subsample from another vector of data. The important point is that once a section of the transect has been sampled, it cannot be resampled by an overlapping sub-transect. WHile there are obvious l...
2006 Mar 18
2
extraction - subsets
Hi everybody, let us assume i have the following matrixX and vectorY matrixX <- runif(100) dim(matrixX) <- c(10,10) vectorY <- as.matrix(as.character(seq(1,10))) if I define: subsample<-c("2") i can extract the rows from matriX based on the elements in vectorY which are listed in subsample matrixX[vectorY==subsample] if I define subsample with more than 1 element, such as: subsample=c("2", "3") how can i extract the rows from matriX based on t...
2011 May 21
2
unbalanced anova with subsampling (Type III SS)
Hello R-users, I am trying to obtain Type III SS for an ANOVA with subsampling. My design is slightly unbalanced with either 3 or 4 subsamples per replicate. The basic aov model would be: fit <- aov(y~x+Error(subsample)) But this gives Type I SS and not Type III. But, using the drop() option: drop1(fit, test="F") I get an error message: "Error in UseM...
2005 Jan 14
5
subsampling
hi, I would like to subsample the array c(1:200) at random into ten subsamples v1,v2,...,v10. I tried with to go progressively like this: > x<-c(1:200) > v1<-sample(x,20) > y<-x[-v1] > v2<-sample(y,20) and then I want to do: >x<-y[-v2] Error: subscript out of bounds.
2011 Aug 11
1
Subsampling data
*Dear R community* * * *I have two questions on data subsample manipulation. I am starting to use R again after a long brake and feel a bit rusty.* * * *I want to select a subsample of data for males and females separately* * * library(foreign) Datatemp <- read.spss("H:/Skjol/Data/HL/t1and2b.sav", use.value.labels = F) > table(D...
2004 Jul 26
1
group definition for a bootstrap
Hi, This is probably really simple, but I am clearly not R-minded, I have read the help files, and reread them, and I still can't work out what to do... I have a data frame (d) with 3 columns (age (0-5), quarter (1-4) and x). I want to estimate the precision of my mean x by age and quarter, so I want to carry out a bootstrap for each group. I am trying to do this within a loop, so I don't
2013 Jan 18
0
repeat resampling with different subsample sizes
Hi, I'm trying to write a code (see below) to randomly resample measurements of one variable (say here the variable "counts" in the data frame "dat") with different resampled subsample sizes. The code works fine for a single resampled subsample size (in the code below = 10). I then tried to generalize this by writing a function with a loop, where in each loop the function should do the calculations with increasing subsample size (say for j in 1:100). Problem is, I can't tell...
2012 Aug 16
1
Big Data reading subsample csv
Hello, I'm most grateful for your time to read this. I have a uber size 30GB file of 6 million records and 3000 (mostly categorical data) columns in csv format. I want to bootstrap subsamples for multinomial regression, but it's proving difficult even with my 64GB RAM in my machine and twice that swap file , the process becomes super slow and halts. I'm thinking about generating subsample indicies in R and feeding them into a system command using sed or awk, but don't kn...
2010 Oct 31
2
Randomly split a sample in two equal subsamples
Dear all, I would like to randomly split a sample in two equally large subsamples. The sample data is stored as a matrix with each row representing an individual and each column representing some variable (e.g., name, age, sex, etc.); the first row contains the names of the variables; the first column contains the individual number (1:n, for n individuals); the number of indiv...
2011 Nov 01
1
Subsampling-oversampling from a data frame
...low > 20 f high > 15 f low > 10 m low > > in my original data set i have 1200 rows and a class distribution of > low=0.3 and high=0.7 > > > My question : how can i create a new data frame as the one shown above but > with the 'high' class subsampled so that in the new data frame the class > distribution is low=0.5 and high=0.5? > > I tried looking at the sample function and prob option but all examples i > seen do not use an imbalanced class problem as the one shown above > > > Thank you in advance > > > Th...
2010 May 07
3
for loop
...e following loop im generating objects of type table. What I would like to do is to put all those objects together in a list (that i called cc).I did this but the result is not what i espect to get: cc=list() d=1 for (i in data) { cc=list(cc,assign(paste("n",d,sep=""),table(i,subsample$vD31NADD))) d=d+1} I know that this won't work properly: cc=list(cc,assign(paste("n",d,sep=""),table(i,subsample$vD31NADD))) but I dont know a way to add to my list the new objects generated at each step of the loop. Thanks for your attention! [[alternative HTML version...
2009 Apr 06
3
how to subsample all possible combinations of n species taken 1:n at a time?
Hello I apologise for the length of this entry but please bear with me. In short: I need a way of subsampling communities from all possible communities of n taxa taken 1:n at a time without having to calculate all possible combinations (because this gives me a memory error - using combn() or expand.grid() at least). Does anyone know of a function? Or can you help me edit the combn or expand.grid fun...
2011 Feb 06
2
Subsampling out of site*abundance matrix
...)<-c("site1", "site2", "site3", "site4") ##### > abund2 spA spB spC spD spa spF spG site1 150 150 150 150 0 300 300 site2 300 300 0 0 300 300 0 site3 0 0 60 540 0 0 600 site4 360 240 0 0 240 360 0 How can I make a random subsample of 100 individuals from the abundances given for each site? This is probably really easy. Thanks. Bubba -- View this message in context: http://r.789695.n4.nabble.com/Subsampling-out-of-site-abundance-matrix-tp3263148p3263148.html Sent from the R help mailing list archive at Nabble.com.
2008 Sep 16
1
analyze subsample of dataframe
...ply need to subtract 1 from every judy value for the year 2004 (without altering judy values from other years!). What is the most effective way of going about this? Can I integrally subset within a function of some form? Merci Tyler -- View this message in context: http://www.nabble.com/analyze-subsample-of-dataframe-tp19520470p19520470.html Sent from the R help mailing list archive at Nabble.com.
2009 Jul 21
1
Subsample points for mclust
...aussians. So I'm using the package 'mclust' to get the Gaussians's parameters for this 1D distribution. It works very well, but, for input sizes above 100.000 values it starts taking really forever. Unfortunately my dataset has around 4.6M values... My question: is it correct to subsample my dataset taking a value every N to make mclust happy? Or have I no alternative except using the complete dataset? Excuse my profound ignorance and thank for your help! mario -- Ing. Mario Valle Da...
2010 Nov 09
1
subsampling table
G'day R-helpers, I want to subsample rows of a large table based on the value in its first column. Of all rows sharing the same value in the first column I want to RANDOMLY extract only one. Thanks in advance, Achim example input 1 15 34 1 4 66 1 24 65 2 23 47 2 9 36 3 58 9 3 38 64 3 12 64 3 4 15 4 1 88 4 23 90 desired output...
2012 Jun 28
2
Size of subsample in ecodist mantel()
What is the size of the boostrapped subsample in ecodist mantel() thanks [[alternative HTML version deleted]]
2011 Mar 02
0
Selecting a subsample so that it follows a distribution.
...gnificant genes, but a lot narrower. Simple because my method assumes a uniform distribution of values to chose from. Sorry if this was a complicated message, I would highly appreciate any help or comments! Best, Bryo -- View this message in context: http://r.789695.n4.nabble.com/Selecting-a-subsample-so-that-it-follows-a-distribution-tp3331659p3331659.html Sent from the R help mailing list archive at Nabble.com.
2009 Jun 26
1
Where can I find information on how to subsample a time series?
...of the previous month) and between the 22 day delta and the 66 day delta that ends the day before the the first day of the 22 day delta. However, I KNOW the statistical properties of the time series are not constant (so the usual assumptions do not apply to the entire series). Therefore, I want to subsample finely enough to get a reasonably sensible correlation and examine how that changes through time. (There are no tests of significance here: I just want to explore just how much the properties of these series change through time). I have C++ code, admittedly not written particularly efficiently,...
2011 May 13
0
routine for dependent correlation test with stratified random sample
Dear R-List,   I would like to have a large number of stratified random subsamples drawn from my dataframe and automatically test for correlation differences in every subsample.   Let this be my dataframe   df<-data.frame(group=c(rep(1,5),rep(2,5),rep(3,5)),a=c(3,4,5,6,3,4,5,4,5,4,1,2,1,2,1),b=c(1,2,3,4,5,3,4,3,4,5,6,5,6,2,3),c=c(2,2,3,3,5,1,1,6,6,5,6,1,1,2,1))   Then I woul...