Displaying 20 results from an estimated 4000 matches similar to: "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,
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 13
6
random samples
hi,
I am encoutering a very little problem that seemed to be so easy to solve....
I need to divide the array
> A<-c(1:200)
into two subsets at random. Therefore I use the function "sample" in R:
> S<-sample(A,100)
for a random sample of size 100. Then I need the values in A that are not
selected in S to be put in another array, there is my problem!
Is there anyway to do
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
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
2005 Jan 12
4
(no subject)
hi,
I am trying to grow a classification tree on some data, but I have a little
problem. In order to do so I have to use a function like "tree" in R and on the
internet help(tree) I get the following:
"The left-hand-side (response) should be either a numerical vector when a
regression tree will be fitted or a factor, when a classification tree is produced"
I would like to
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
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,
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
2005 Jan 01
4
plot
Is it possible to make multiple plots i.e. to represent more than one
function on the same figure?
Thank you
Email: botti23@libero.it
[[alternative HTML version deleted]]
2011 Sep 08
1
random sampling but with caveats!
Hi,
I wonder if someone can help me. I have built a gam model to predict the presence of cold water corals and am now trying to evaluate my model by splitting my dataset into training/test datasets.
In an ideal world I would use the sample() function to randomly select rows of data for me so for example with 936 rows of data in my HH dataset I might say
ss <- sample(nrow(HH), size =
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
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 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,
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
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
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]]
2005 Sep 07
7
Plot of multiple data sets
Hello !
There is something quite simple I want to do with R but I found nowhere in the help how to do it.
I just want to plot data which are in a matrix, every column being a data set and having the same
x-axis (just an index).
So for example if I have a 50 x 6 matrix I want 6 set of points on the same plot.
I tried
plot,new()
plot(MATRIX[,1])
plot(MATRIX[,2])
...
but it replaces the previous
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