similar to: sampling vectors

Displaying 20 results from an estimated 10000 matches similar to: "sampling vectors"

2005 Sep 21
3
Clustering and bootstrap
Dear Listers, I emailed the list a few days ago about how to bootstrap a community matrix (species by sites) and get a consensus tree with node support. A friend pointed out that a similar question remained unanswered in 2004. I wish to re-word my question: is anyone aware of a package / method to obtain a majority-rule consensus tree from x distance matrices ? Is anyone using R to generate
2009 Feb 17
2
Chromatogram deconvolution and peak matching
Hi, I'm trying to match peaks between chromatographic runs. I'm able to match peaks when they are chromatographed with the same method, but not when there are different methods are used and spectra comes in to play. While searching I found the ALS package which should be usefull for my application, but I couldn't figure it out. I made some dummy chroms with R, which mimic my actual
2007 Mar 30
1
faster computation of cumulative multinomial distribution
Dear list members, I have a series of /unequal/ probabilities [p1,p2,...,pk], describing mutually exclusive events, and a "remainder" class with a probability p0=1-p1-p2-....-pk, and need to calculate, for a given number of trials t>=k, the combined probability that each of the classes 1...k contains at least 1 "event" (the remainder class may be empty). To me this reaks
2004 Feb 11
6
AGREP
Hi all, I have two questions 1 - I have the version 1.4.1 of R, and it doesn't have the 'agrep' function in the base library. Is there a way to make this funcion avaliable in R 1.4.1? I mean, how to 'copy' it from R 1.8.1 and 'paste' it in R 1.4.1? 2 - The AGREP function doesn't give me the Levenshtein distance (edit distance). Is there a function in R that does
2010 Sep 08
11
problem with outer
Hello, i wrote this function guete and now i want to plot it: but i get this error message. i hope someone can help me. Error in dim(robj) <- c(dX, dY) : dims [product 16] do not match the length of object [1] p_11=seq(0,0.3,0.1) p_12=seq(0.1,0.4,0.1) guete = function(p_11,p_12) { set.seed(1000) S_vek=matrix(0,nrow=N,ncol=1) for(i in 1:N) { X_0=rmultinom(q-1,size=1,prob=p_0)
2010 Apr 04
2
"mantel.haenszel.test for trend in S-plus doesn't work i R"
Dear R'ers, When I used S-plus i wrote a small program for a Mantel-Haenszel test for trend (I think it worked). Unfortunately I can't get it working in R. It appears as if my use of 'el' is the problem but I can't sort it out. Error in apply(array, c(, 2, 3), function(el) el * 1:s) : argument is missing, with no default Further down in the program I use 'el'
2006 Jan 19
1
matrix export
Dear listers, I need to export a distance matrix in the following format : a 0.0 1.0 0.2 1.0 1.0 b 1.0 0.0 1.0 1.0 1.0 c 0.2 1.0 0.0 1.0 1.0 d 1.0 1.0 1.0 0.0 1.0 e 1.0 1.0 1.0 1.0 0.0 I tried write.matrix() from the MASS library, which gives: a b c d e 0.0 1.0 0.2 1.0 1.0 1.0 0.0 1.0 1.0 1.0 0.2 1.0 0.0 1.0 1.0 1.0 1.0 1.0 0.0 1.0 1.0 1.0 1.0 1.0 0.0 Does anyone know of an R trick to change
2003 Jan 27
1
rmultinom() -- how \\ via own C code?
I've had a need for multinomial "random number generation" occasionally. And other people too. The following code is currently in the (very small ``not very high importance'') CRAN package normix --- which I will rename to "nor1mix" very seen because of a ``name registration'' problem I want to add "this" (well the functionality) to a
2016 Jan 27
2
Bootstrap data frame (Jesús Para Fernández)
Hola Jesús, Si no entiendo mal lo que planteas, has observado unas frecuencias N = c(12, 0, 8, 6, 4, 2) de pedidos acaecidos en 1:6 días, en total n = sum(N) pedidos. Llamemos P = (p1, p2, ?, p6) a las probabilidades ?teóricas? de pedido en cada día. En principio el vector N se puede considerar una realización de una distribución multinomial M(n; p1, ?, p6). P se puede estimar mediante las
2006 Feb 07
1
matching tables
Dear Listers, I am trying to match tables that DO NOT have the same length. The tables result from the function "table()" so they look like this: table 1 2 3 4 3 5 7 table 2 1 2 3 6 4 5 I need the following output: (NOTICE THE ZEROS) 1 2 3 4 table1 0 3 5 7 table2 6 4 5 0 Unfortunately, I was not successful using "match()". Previous postings explain how to do
2011 Apr 15
1
How to generate a correlation matrix with restrictions on its eigenvalues
Dear All, I would like to generate m positive real numbers c_i, I=1,...,m, such that (1) c_1 + c_2 + ... + c_m=m, (1) after being ordered into c_1 >= c_2 >= .... >=c_m>0, we have that c_m is of the same order of m^(-1/8), when m is sufficiently large. Thanks, -Chee [[alternative HTML version deleted]]
2006 Jun 08
2
nested mixed-effect model: variance components
Dear listers, I am trying to assess variance components for a nested, mixed-effects model. I think I got an answer that make sense from R, but I have a warning message and I wanted to check that what I am looking at is actually what I need: my data are organized as transects within stations, stations within habitats, habitats within lagoons. lagoons: random, habitats: fixed the question is:
2008 Mar 18
2
rmultinomial() function
After scouring the online R resources and help pages, I still need clarification on the function rmultinomial(). I would like to create a vector, say of 100 elements, where every element in the vector can take on the value of 0, 1 or 2, and where each of those values have a specific probability. ie. the probability a given element in the vector = 0 is 0.06, 1 = 0.38, 2 = 0.56 (probabilities sum
2006 Feb 23
1
R and marine protected areas: algorithms for site selection
Dear listers, a central problem in conservation biology is the selection of sites in reserve network design. many algorithms have been published, and I was wondering any have been implemented in R. I did not seen anything on CRAN or R-help, or on the web in general. Best regards, Eric Eric Pante ---------------------------------------------------------------- College of Charleston, Grice
2008 Jan 17
1
'simulate.p.value' for goodness of fit
R Help on 'chisq.test' states that "if 'simulate.p.value' is 'TRUE', the p-value is computed by Monte Carlo simulation with 'B' replicates. In the contingency table case this is done by random sampling from the set of all contingency tables with given marginals, and works only if the marginals are positive... In the
2009 Aug 30
1
Stochastic (transition) matrices: how to determine distributions and variance?
(apologies for the cross-posting, and for this being a more general stats question rather than a specific-to-R one. I assure you I will be doing the actual analysis in R :) I am trying to determine the distribution and variance for a classic stochastic (transition) matrix problem such that: let x(t) be an initial state vector consisting of counts of classes A, B and C: x(t) =
2013 Oct 18
2
pamer.fnc y la nueva versión de R
Javier, Creo que aquí aplica la ley de Linus que dice: "Dado un número suficientemente elevado de ojos, todos los errores se convierten en obvios". La persona que revisa y encuentra un error no necesariamente tiene que ser la misma que la que lo escribe. Una motivación muy importante al compartir un código es la de recibir los beneficios del control de calidad por parte de tus pares.
2003 Nov 18
2
sampling without repetition
Hi, I'm trying to write a function that will divide a given range of numbers into 3 sets using sample(), without repetition. Currently I'm trying this approach: r <- 1:10 s1 <- sample(r,size=3) Next, I want to remove the selected elements from r and sample() from the remainder. r <- r[ -(r=s1) ] s2 <- sample(r,size=3) When I go to remove the elements contained in s2 from
2006 Mar 08
3
Multiple logistic regression
Dear R-users, Is there a function in R that classifies data in more than 2 groups using logistic regression/classification? I want to compare the c-indices of earlier research (lrm, binary response variables) with new c-indices obtained from 'multiple' (more response variables) logistic regression. Best regards, Stephanie Delalieux Department Biosystems M?-BIORES Group of Geomatics
2008 Oct 15
2
Help Help with sampling
Hi everyone, I have a dataset(named "Mydata") which includes 4 different variables named; s1,s2,s3,s4 .Each variable(symptom) has 14 patients. I need to use random sampling to make, 5 different samples from my data with 5 patients in each sample. i.e. using all 4 variables I need to make 5 different samples by changing patients(with 5 patients in each sample). X8 X9 X10 X102 X110