Displaying 20 results from an estimated 192 matches for "subsamplings".
Did you mean:
subsampling
2003 Feb 12
1
Na/NaN error in subsampling script
R-help readers,
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,
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
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
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(Datatemp$sex)
1 2
3049 3702
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
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
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 individuals is even (so,
2011 Nov 01
1
Subsampling-oversampling from a data frame
If no one has a better solution, split it, take a sample of size X from both
and put it back together.
hgwelec wrote:
>
> Dear members,
>
> Consider the following data frame (first 4 rows shown)
>
>
> age sex class
> 15 m low
> 20 f high
> 15 f low
> 10 m low
>
> in my original data set i have 1200 rows and a class distribution
2010 May 07
3
for loop
Dear list,
in the 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:
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
2011 Feb 06
2
Subsampling out of site*abundance matrix
Hello,
How can I randomly sample individuals within a sites from a site (row) X
species abundance (column) data frame or matrix? As an example, the matrix
"abund2" made below.
##### (sorry, Im a newbie and this is the only way I know to get an example
on here)
abund1 <- c(150, 300, 0, 360, 150, 300, 0, 240, 150, 0, 60,
0, 150, 0, 540, 0, 0, 300, 0, 240, 300, 300,
2008 Sep 16
1
analyze subsample of dataframe
Hi there,
I'm dealing with a pretty big dataset (~22,000 entries) with numerous
entries for every day over a period of several years. I have a column
"judy" (for Julian Day) with 0 beginning on Jan. 1st of every new year (I
want to compare tendencies between years). However, in order to control for
a leap year (2004), I simply need to subtract 1 from every judy value for
the year
2009 Jul 21
1
Subsample points for mclust
Hi all!
I have an ordered vector of values. The distribution of these values can
be modeled by a sum of Gaussians.
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
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
1 4 66
2 23 47
3 12 64
4 1 88
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.
Hi All,
I want to select rows at random from a large data.frame while achieving a
particular distribution defined my a given subset of this data.frame. How
can I do this? More details and what I've done so far is given below.
I have gene expression data and gene sets of interest. In order to look at
enrichment of differential expression I'm doing a simple permutation
approach: Selecting
2009 Jun 26
1
Where can I find information on how to subsample a time series?
I suspect I'm looking in the wrong places, so guidance to the relevant
documentation would be as welcome as a little code snippet.
I have time series data stored in a MySQL database. There is the usual DATE
field, along with a double precision number: there are daily values
(including only normal working days: Monday through Friday). I actually
have to do a couple things here. Because of
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 would like to have n