Displaying 20 results from an estimated 36 matches for "nperm".
Did you mean:
eperm
2010 Feb 11
1
Code find exact distribution for runs test?
..., 3, 7, -2, -6, -6, -5, -2, -1)
The Monte Carlo permutation approach seems to get me part way.
# calculate the number of runs in the data vector
nruns <- function(x) {
signs <- sign(x)
runs <- rle(signs)
r <- length(runs$lengths)
return(r)
}
MC.runs <- function(x, nperm) {
RUNS <- numeric(nperm)
for (i in 1:nperm) {
RUNS[i] <- nruns(sample(x))
}
cdf <- cumsum(table(RUNS))/nperm
return(list(RUNS=RUNS, cdf=cdf, nperm=nperm))
}
MC.runs(dtemp, 100000)
Thanks. --Dale
2006 Aug 02
0
[PATCH] xenstore-chmod
...s] key <mode [modes...]>", progname);
#endif
}
@@ -78,10 +80,61 @@ do_rm(char *path, struct xs_handle *xsh,
}
#endif
+#if defined(CLIENT_chmod)
+#define PATH_SEP ''/''
+#define MAX_PATH_LEN 256
+
+static void
+do_chmod(char *path, struct xs_permissions *perms, int nperms, int upto,
+ int recurse, struct xs_handle *xsh, xs_transaction_t xth)
+{
+ int ret;
+
+ if (!path[0])
+ return;
+
+ ret = xs_set_permissions(xsh, xth, path, perms, nperms);
+ if (!ret)
+ err(1, "Error occurred setting permissions on ''%s''", path);
+
+ if...
2011 Mar 30
2
[PATCH] xenstore-stat v2
...ot;r-";
+ case XS_PERM_READ|XS_PERM_WRITE:
+ return "rw";
+ case XS_PERM_NONE:
+ return "--";
+ default:
+ return "uu";
+ }
+}
+
+static void
+do_stat(struct xs_handle *xsh, xs_transaction_t xth, char *path)
+{
+ unsigned int i, nperms;
+ struct xs_permissions *perms;
+
+ perms = xs_get_permissions(xsh, xth, path, &nperms);
+ if (!perms)
+ errx(1, "Unable to get permission on %s\n", path);
+
+ if (!nperms) {
+ free(perms);
+ errx(1, "Cannot determine owner of %s\n", path);...
2009 Apr 21
6
Sampling in R
[This email is either empty or too large to be displayed at this time]
2012 Nov 29
0
Simper analysis with Morisita-Horn
...ength(permutations) == 1) {
perm <- shuffleSet(nobs, permutations, ...)
}
else {
perm <- permutations
}
if (ncol(perm) != nobs)
stop(gettextf("'permutations' have %d columns, but data have %d
rows",
ncol(perm), nobs))
nperm <- nrow(perm)
if (nperm > 0)
perm.contr <- matrix(nrow = P, ncol = nperm)
for (i in 1:nrow(comp)) {
group.a <- comm[group == comp[i, 1], ]
group.b <- comm[group == comp[i, 2], ]
n.a <- nrow(group.a)
n.b <- nrow(group.b)
c...
2010 May 05
1
What is the default nPerm for regression in randomForest?
Could not find it in ?randomForest.
Thank you for your help!
--
Dimitri Liakhovitski
Ninah.com
Dimitri.Liakhovitski at ninah.com
2012 Feb 27
1
How to incorporate interaction terms in MRM function of ecodist library?
...ng a (+) sign as known. However, when I try
to use the (*) sign or (:) between two terms that I'd like to check the
interaction for, I get same results as with just additive model. Is there
something that I do wrong?
Thanks,
*For example: *
> mrm.S10z_A<- MRM(Adis ~ S10z.st+Distance.st, nperm=100)
> mrm.S10z_A
$coef
Adis pval
Int 0.553605282 0.06
S10z.st -0.002587542 0.86
Distance.st 0.028866573 0.07
$r.squared
R2 pval
0.004180399 0.060000000
$F.test
F F.pval
4.634535 0.060000
> mrm.S10z_A<- MRM(Adis ~ S10z.st*Di...
2011 Dec 03
1
partial mantel tests in ecodist with intential NA values.
...(ncf)
> x<-sample(1:1000,20)
> y<-sample(1:1000,20)
> z<-sample(1:1000,20)
> M1<-as.matrix( distance(x))
> M2 <-as.matrix( distance(y ))
> M3<-as.matrix( distance(z ))
> D1<-(lower(M1))
> D2<-(lower(M2))
> D3<-(lower(M3))
> mantel(D1 ~ D2+D3, nperm=1000)
mantelr pval1 pval2 pval3 llim.2.5% ulim.97.5%
0.09014696 0.10300000 0.89800000 0.18400000 0.01857311 0.18468621
> partial.mantel.test(M1,M2,M3,quiet=T)
$MantelR
r12 r13 r23 r12.3 r13.2
0.08977575 0.02170997 -0.01561346 0.0901469...
2001 Apr 28
2
Mantel's randomization test
Dear all,
Dose anyone know whether there is a good R packege or
program for Mantel's randomization test?
Thanks in advance.
------------------------
Takashi Mizuno
zoono at sci.osaka-cu.ac.jp
Plant Ecology Lab.
Osaka City University
------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read
2010 May 24
1
Error during wrapup: cannot open the connection
...;- x[dd,11:20] + u
> y <- c(rep(1,10),rep(2,10))
>
> data <- list ( x=x, y=y, geneid=as.character(1:nrow(x)),
+ genenames=paste("g",as.character(1:nrow(x))) )
>
> samr.obj <- samr ( data, resp.type="Two class unpaired",
+ nperms=100, logged2=TRUE )
Error in samr(data, resp.type = "Two class unpaired", nperms = 100, logged2
= TRUE) :
unused argument(s) (logged2 = TRUE)
Error during wrapup: cannot open the connection
>
>
> samr.obj <- samr ( data, resp.type="Two class unpaired",
+...
2008 Jan 25
1
increasing speed for permutations of glm
...e data; the actual data is 700x800
myData <- matrix(sample(c(1:3),500,replace=TRUE),nrow=100,ncol=5)
# the response is binary
response <- c(rep(1,50),rep(0,50))
# initalize permutation of response 'labels'.
perm.response <- response
counts <- rep(1,18)
# Number of permutations
nperm <- 5
# matrix of all pairs of indices
all.pairs <- combn2(1:ncol(myData))
# initalize results
pmatrix <- matrix(-1,nrow=nperm,ncol=nrow(all.pairs))
getLRTpval <- function(index)
{
# A contingency table is formed from two columns of the data and the
response (3 way table) and made i...
2007 Mar 16
2
MANOVA permutation testing
...t <- c()
for (i in 1:1000){
wilks <- summary.manova(manova(maxent~sample(max.spec)),
test="Wilks")$stats[1,2]
result.vect <- c(res.vect,wilks)
}
maxent is the data, max.spec is a vector of species names. Comparing
the result.vect with the wilks value for the unpermuted data suggests
there are very significant differences among species -- but did I do
this properly?
--
Regards,
Tyler Smith
2009 May 20
1
Comparing spatial distributions - permutation test implementation
....getdropbox.com/u/1047321/syrjala_data_cod.csv >
syrjala_data_cod.csv")
dataCod = read.csv(file = "syrjala_data_cod.csv", header = TRUE)
# Normalize abundances
dataCod$var1 = dataCod$var1/sum(dataCod$var1)
dataCod$var2 = dataCod$var2/sum(dataCod$var2)
# Number of permutations
nperm = 1000
# Create nperm-1 replicates of the data (one is the original
observation)
d = rep(list(dataCod), nperm-1)
# Compute number of observations before to avoid doing that for every
replicate
n = nrow(dataCod)
require(plyr)
# Permute some observations and compute the syrjala stat for each...
2008 Jun 15
1
randomForest, 'No forest component...' error while calling Predict()
....txt",header=TRUE,sep="\t")
# Both CT & CV have the syntaxis X1, X2,...,X97,Y where all variables are
numeric
x <- CT[,-98]
y <- CT[,98]
xtest <- CV[,-98]
ytest <- CV[,98]
library(randomForest)
model <- randomForest(x ,y , xtest,
ytest,ntree=500,mtry=32,nodesize=5,nPerm=2)
model
#Call:
# randomForest(x = x, y = y, xtest = xtest, ytest = ytest, ntree = 500,
mtry = 32, nodesize = 5,
# nPerm = 2)
# Type of random forest: regression
# Number of trees: 500
#No. of variables tried at each split: 32
#
# Mean of squared re...
2007 Jan 21
2
efficient code. how to reduce running time?
...suggestions would be
appreciated.
thanks a lot.
Mira
----------------------------------------------------------------------------------------------
#sub function for finding index
rfind <- function(x)seq(along=x)[x*(1-x)>MAF*(1-MAF)]
#sub function for permutation test
perm.F = function(y,x,nperms,sites)
{
maxF = c();
for (i in 1:nperms)
{
F=numeric(S) #create an empty vector to store the F-values
newY=sample(y,length(y)) #permute the cancer types
newX = cbind(x, newY);
# anova for all sites
for ( i in sites )
{
a <- anova(lm(newY~factor(newX[,i]...
2012 Mar 14
2
Using the mantel test in Ape Package
...na.strings = c(" "),
fill = T,
header = FALSE,
blank.lines.skip = FALSE)
Gen_matrix <- as.matrix(Gen_dists)
mantel.test(Geo_matrix, Gen_matrix, nperm = 999, graph = T, alternative = "great")
I am getting a result but with lots of warning messages :
"Warning: non-square matrix"
However, my matrices are square!
Has anyone else had this problem?
Many thanks.
[[alternative HTML version deleted]]
2010 Aug 24
0
SAMR for paired samples
Hi R-help,
I am trying to use 'samr' for 10 pre and post paired samples to test
whether
post is different from pre (i.e., the location shift for the delta of
(post-pre)).
However, I got an error message saying
> samr.obj<-samr(d, resp.type="Two class paired", nperms=100,
random.seed=100)
perm= 1
Error in !logged2 : invalid argument type
Does anyone know what this means? or how to solve this error?
Also, the options 'One Sample paired' is for testing the differences
directly (d1, d2,...), I suppose.
The source code is
***************************...
2012 Feb 11
1
AMOVA error: 'bin' must be numeric or a factor
...eft other options as
default
d<- dist.dna(dna, model="raw")
g<- read.table("XXX.design")
Load necessary libraries:
library(pegas)
Loading required package: adegenet
Loading required package: MASS
Loading required package: ade4
Running Amova:
amova(d ~ g, nperm = 100)
Error in FUN(X[[1L]], ...) : 'bin' must be numeric or a factor
How can I solve this "bin" problem?
I think it might be a problem with the g variabel. In the example they
type
g <- factor(c(rep("A", 7), rep("B", 8)))
I cannot find any informa...
2012 Nov 28
1
GSEA package error
...inal/) with 11k rows(genes) and 60 cols (58
samples (29N vs 29T), GO IDs, KEGG IDs).
I also have a separate vector GS with the GO IDs mapped to genes (no
duplicate genes but multiple IDs per gene like in col 59)
However when I try to run:
/singleDC(data_final, group=c(1:29,30,58), GSdefList = GS, nperm = 3,
permDI=TRUE)/
I get an error/ ?unused argument(s) (permDI=TRUE)?/
When I run it without that argument it runs indefinitely even if I use only
100 rows data_final[1:100,].
Furthermore when I block the computation I get the error:
/Error in `[.data.frame`(fixed.gs.data, , (csum.group[i-1] +...
2009 Oct 20
1
kendall.global
...ups
> group <-c(1,1,2,1,1,1,1,1,2,1,1,1,1,1,1,2,1,2,1,1,1,1,2,1,2,1,1,1,1,1,2,2,2,2,2)
> kendall.global(mite.hel, group=group)
Errore in FUN(newX[, i], ...) :
.Random.seed is not an integer vector but of type 'list'
> kendall.post(mite.hel, group=group, mult="holm", nperm=99)
Errore in sample(R.gr[, j]) :
.Random.seed is not an integer vector but of type 'list'
Thank you very much if you know how to solve it.
Rosa.
[[alternative HTML version deleted]]