search for: nsimul

Displaying 7 results from an estimated 7 matches for "nsimul".

Did you mean: simul
2005 Feb 08
2
rename object
Dear list, I would like to rename an object as follows: SimLUall <- matrix(c(0,1,0,0, 1,0,0,0, 0,0,1,0, 0,0,0,1),nrow=4, ncol=4) j <- 2 SimLUall2 <- SimLUall and j The value of j should be assigned automatically to SimLUall. How can I achieve this? Regards, Ulrich
2010 Aug 30
1
lost in vegan package
...ts for each species pair of a matrix. I've prepared the function: pair.checker=function (dataset) {designdist (dataset, method="c("(A-J)x(B-J)", terms ="binary", abcd=FALSE)} to use with function oecosimu as follows: oecosimu(dataset, pair.checker, "tswap", nsimul=5000, burnin=0, thin=thin, statistic="pair.checker") It seemed to work but the output did not include each species pair name. I don't know what to do. First column was all NAs. I copied and pasted the results of the console and named each species pair in Excel by hand. But then I got...
2016 Apr 25
0
use switch or function in connecting different cases.
This is my current work.Now i am trying to use a function to do the normal distribution simulation. rm(list=ls()) t <- u<- mann<- rep(0, 45) Nsimulation<-function(S1,S2,Sds,nSims) { set.seed(1) for (sim in 1:nSims) { matrix_t <-matrix(0,nrow=nSims,ncol=3) matrix_u<-matrix(0,nrow=nSims,ncol=3) matrix_mann <-matrix(0,nrow=nSims,ncol=3) #gener...
2011 Apr 19
0
Error message in package:bayesSurv. Why?
...ows sample.childmdd <- bayessurvreg3( formula=Surv(childtime+.01,childevent)~nchild+cluster(id), random=~1, formula2=Surv(mddtime+.01,mddevent)~nchild+blustatus+well.before+earlydep+cluster(id), random2=~1, onlyX=FALSE, dir="chaindir.childmdd", nsimul=nsimul.childmdd, prior=prior.gspl.child, prior2=prior.gspl.mdd, prior.beta=prior.beta.child, prior.beta2=prior.beta.mdd, prior.b=prior.b.child, prior.b2=prior.b.mdd, init=init.child, init2=init.mdd, store=list(a=TRUE, a2=TRUE, a.b=TRUE, a.b2=TRUE), da...
2006 Dec 05
1
dynamic variable creation in lists and data frames
...ariables within lists in R. I am running simulations and am interested in two parameters, ESM and ESMM (the similarity of these names is important for my question). I do simulations to generate ESMM, then plug these values into a second simulation function to get ESM: x <- list() for (i in 1:nsimulations) { x$ESMM[i] <- do_simulation1() x$ESM[i] <- do_simulation2(x$ESMM[i]) } and I return everything as a dataframe, x <- as.data.frame(x) When I do this, I find that x$ESMM is overwritten by x$ESM for the first simulation. However, x$ESM is nonetheless correctly generated using x$E...
2016 Apr 25
2
R: use switch or function in connecting different cases.
HI, I am trying to use switch () function to connect the three distribution (normal ,gamma with equal skewness and gamma with unequal skewness. But i am losing my ideas since i have sample sizes-(10,10),(10,25),(25,25),(25,50),(25,100),50,25),(50,100), (100,25),(100,100) standard deviation ratio- (1.00, 1.50, 2.00, 2.50, 3.00 and 3.50) distribution of gamma distribution with unequal skewness
2007 Jun 30
1
random numbers
...Here are some issues I see: 1) The much simpler method of using the consecutive integers as seeds also seemed to work. This also has the advantage of repeatability. I avoided it because I was concerned it wouldn't be random enough. Would consecutive integers as in parLapply(cluster, seq(nSimulations), function(i) myfunction(seed=i)) be sufficient? I suppose I could also generate all the random seeds on the master. 2) This got me thinking about how to generate random integers that span the whole range of 32 bit signed integers. The method show above only spans half the range, since .Ma...