Home
last modified time | relevance | path

Searched refs:nsim (Results 1 – 25 of 1156) sorted by relevance

12345678910>>...47

/dports/math/R-cran-KFAS/KFAS/R/
H A DsimHelper.R4 simHelper <- function(model, nsim, antithetics) { argument
6 epsplus <- array(0, c(attr(model, "p"), attr(model, "n"), nsim))
8 aplus1 <- array(0, dim = c(attr(model, "m"), nsim))
17 dfeps <- sum(x)/nsim
21 dfeta <- sum(x2)/nsim
25 u <- rnorm(dfu * nsim, mean = 0, sd = 1)
27 epsplus[x] <- u[1:(dfeps * nsim)]
29 etaplus[x2] <- u[(dfeps * nsim + 1):(dfeps * nsim + dfeta * nsim)]
31 aplus1[nonzeroP1, ] <- u[(dfeps * nsim + dfeta * nsim + 1):(dfu * nsim)]
32 c2 <- numeric(nsim)
[all …]
H A DimportanceSSM.R79 filtered = FALSE, nsim = 1000, save.model = FALSE, theta, argument
87 if(nsim<1)
108 simtmp <- simHelper(model, nsim, antithetics)
119 simtmp$nNonzeroP1inf, 1e-08, simtmp$nNonzeroP1, as.integer(nsim),
122 w = numeric(3 * nsim * antithetics + nsim),
123 sim = array(0, c(simdim, n, 3 * nsim * antithetics + nsim)), sim.what, simdim,
132 simtmp$nNonzeroP1inf, 1e-08, simtmp$nNonzeroP1, as.integer(nsim),
135 w = array(0, c(n, 3 * nsim * antithetics + nsim)),
136 sim = array(0, c(simdim, n, 3 * nsim * antithetics + nsim)), sim.what, simdim,
H A Dinterval.R6 type = c("response", "link"), states = NULL, nsim, se.fit = TRUE, argument
19 nsim = nsim, antithetics = TRUE, maxiter = maxiter, filtered = filtered, expected = expected)
20 nsim <- as.integer(4 * nsim)
27 imp$samples, signal = array(0, c(n, p, nsim)),
28 p, m, n, nsim, length(states), states)$signal
64 sample_mu <- sample(imp$samples[i, j, ], size = nsim, replace = TRUE,
67 gaussian = rnorm(n = nsim, mean = sample_mu, sd = model$u[timespan[i], j]),
68 poisson = rpois(n = nsim, lambda = sample_mu),
69 binomial = rbinom(n = nsim, size = (if (!prob) model$u[timespan[i], j] else 1),
71 gamma = rgamma(n = nsim, shape = model$u[timespan[i], j],
[all …]
H A DsimulateSSM.R98 filtered = FALSE, nsim = 1, antithetics = FALSE, conditional = TRUE) { argument
127 simtmp <- simHelper(object, nsim, antithetics)
135 simtmp$nNonzeroP1, as.integer(nsim), simtmp$epsplus,
140 }, c(simdim, n, 3 * nsim * antithetics + nsim)), simtmp$c2, sim.what,
146 object$P1inf, simtmp$nNonzeroP1, as.integer(nsim), simtmp$epsplus,
151 }, c(simdim, n, 3 * nsim * antithetics + nsim)), simtmp$c2, sim.what,
158 object$P1inf, simtmp$nNonzeroP1, as.integer(nsim), simtmp$epsplus,
161 sim = array(0, c(simdim, n, 3 * nsim * antithetics + nsim)),
/dports/math/R-cran-KFAS/KFAS/src/
H A Dsimgaussianuncond.f9020 double precision, intent(in),dimension(nsim) :: c
21 double precision, intent(inout), dimension(simdim,n,3 * nsim * antithetics + nsim) :: sim
78 do i = 1, nsim
101 sim(:,:,i+nsim) = -epsplus(:,:,i)
103 sim(:,:,i+3*nsim) = c(i)*sim(:,:,i+nsim)
108 sim(:,:,i+nsim) = -etaplus(:,:,i)
110 sim(:,:,i+3*nsim) = c(i)*sim(:,:,i+nsim)
118 sim(1:p,:,i+3*nsim) = c(i)*sim(1:p,:,i+nsim)
121 sim((p+1):,:,i+3*nsim) = c(i)*sim((p+1):,:,i+nsim)
127 sim(:,1,i+nsim) = -aplus(:,1)
[all …]
H A Dsimgaussian.f9022 double precision, intent(in),dimension(nsim) :: c
23 double precision, intent(inout), dimension(simdim,n,3 * nsim * antithetics + nsim) :: sim
26 double precision, intent(inout), dimension(m,nsim) :: aplus1
120 do i = 1, nsim
150 sim(:,:,i+3*nsim) = epshat + c(i)*(sim(:,:,i+nsim)-epshat)
157 sim(:,:,i+3*nsim) = etahat + c(i)*(sim(:,:,i+nsim)-etahat)
165 sim(1:p,:,i+3*nsim) = epshat + c(i)*(sim(1:p,:,i+nsim)-epshat)
168 sim((p+1):,:,i+3*nsim) = etahat + c(i)*(sim((p+1):,:,i+nsim)-etahat)
183 sim(:,1,i+3*nsim) = ahat+ c(i)*(sim(:,1,i+nsim)-ahat)
192 1,0.0d0,sim(:,t,i+(k-1)*nsim),1)
[all …]
H A Disamplefilter.f9026 double precision, intent(in),dimension(nsim) :: c
32 double precision, intent(inout), dimension(simdim,n,3 * nsim * antithetics + nsim) :: sim
33 double precision, dimension(p,(3 * nsim * antithetics + nsim)*(5-simwhat)) :: tsim
36 double precision, dimension(n,3 * nsim * antithetics + nsim) :: w
40 double precision, dimension(p,n,nsim) :: epsplus2
42 double precision, dimension(m,nsim) :: aplus12
43 double precision, dimension(simdim,n,3 * nsim * antithetics + nsim) :: sim2
164 do k=1,3 * nsim * antithetics + nsim
177 do k=1,3 * nsim * antithetics + nsim
190 do k=1,3 * nsim * antithetics + nsim
[all …]
H A Dngsmooth.f9010 integer, intent(in) :: p,m, r, n,nnd,nsim,smootha,smooths,smoothy, rankp,& local
28 double precision, intent(in),dimension(nsim) :: c
29 double precision, intent(inout), dimension(p,n,nsim) :: epsplus
30 double precision, intent(inout), dimension(r,n,nsim) :: etaplus
31 double precision, intent(inout), dimension(m,nsim) :: aplus1
38 double precision, dimension(smootha*m+(1-smootha)*p,n,4*nsim) :: sim
40 double precision, dimension(4*nsim) :: w
58 call covmeanwprotect(sim,w,m,n,4*nsim,alphahat,alphavar)
88 call covmeanw(osim,w,p,n,4*nsim,yhat,yvar)
101 call covmeanwprotect(sim,w,p,n,4*nsim,thetahat,thetavar)
[all …]
H A Disample.f9026 double precision, intent(in),dimension(nsim) :: c
27 double precision, intent(inout), dimension(p,n,nsim) :: epsplus
28 double precision, intent(inout), dimension(r,n,nsim) :: etaplus
29 double precision, intent(inout), dimension(m,nsim) :: aplus1
32 double precision, intent(inout), dimension(simdim,n,3 * nsim * antithetics + nsim) :: sim
33 double precision, dimension(p,(3 * nsim * antithetics + nsim)*(5-simwhat)) :: tsim
36 double precision, dimension(3 * nsim * antithetics + nsim) :: w
121 do i=1,3 * nsim * antithetics + nsim
134 do i=1,3 * nsim * antithetics + nsim
147 do i=1,3 * nsim * antithetics + nsim
[all …]
H A Dngfilter.f9010 integer, intent(in) :: p,m, r, n,nnd,nsim,rankp,smootha,smooths,smoothy& local
28 double precision, intent(in),dimension(nsim) :: c
29 double precision, intent(inout), dimension(p,n,nsim) :: epsplus
30 double precision, intent(inout), dimension(r,n,nsim) :: etaplus
31 double precision, intent(inout), dimension(m,nsim) :: aplus1
38 double precision, dimension(smootha*m+(1-smootha)*p,n,4*nsim) :: sim
40 double precision, dimension(n,4*nsim) :: w
49 p, n, m, r, theta, maxiter,rankp,convtol, nnd,nsim,epsplus,etaplus,&
91 call covmeanw(osim(:,t,:),w(t,:),p,1,4*nsim,yhat(:,t),yvar(:,:,t))
96 p, n, m, r, theta, maxiter,rankp,convtol, nnd,nsim,epsplus,etaplus,&
[all …]
H A Dsimfilter.f908 integer, intent(in) :: p, m, r, n, nsim,nnd,simdim,simwhat,antithetics local
22 double precision, intent(in), dimension(nsim) :: c
23 double precision, intent(inout), dimension(simdim,n,3 * nsim * antithetics + nsim) :: sim
24 double precision, intent(inout), dimension(p,n,nsim) :: epsplus
25 double precision, intent(inout), dimension(r,n,nsim) :: etaplus
26 double precision, intent(inout), dimension(m,nsim) :: aplus1
93 do i = 1, nsim
123 sim(:,t,i+3*nsim) = at(:,t)+ c(i)*(sim(:,t,i+nsim)-at(:,t))
136 alphatmp(:,t,2),1,0.0d0,sim(:,t,i+nsim),1)
138 alphatmp(:,t,3),1,0.0d0,sim(:,t,i+2*nsim),1)
[all …]
/dports/science/gromacs/gromacs-2021.4/src/external/tng_io/src/compression/
H A Drle.c15 const int v, int nsim, in add_rle() argument
18 if (nsim>min_rle) in add_rle()
30 nsim=1; in add_rle()
32 while (nsim--) in add_rle()
45 int nsim=0; in Ptngc_comp_conv_to_rle() local
49 if (!nsim) in Ptngc_comp_conv_to_rle()
52 nsim=1; in Ptngc_comp_conv_to_rle()
57 nsim++; in Ptngc_comp_conv_to_rle()
61 nsim=1; in Ptngc_comp_conv_to_rle()
66 if (nsim!=0) in Ptngc_comp_conv_to_rle()
[all …]
/dports/math/R-cran-pbkrtest/pbkrtest/R/
H A DPB-refdist.R129 ref <- do_sampling(largeModel, smallModel, nsim, cl, details)
135 attr(ref, "samples") <- c(nsim=nsim, npos=sum(ref > 0), nameattr
182 attr(ref, "samples") <- c(nsim=nsim, npos=sum(ref > 0), nameattr
215 .get_refdist_lm <- function(lg, sm, nsim=20, seed=NULL, argument
216 simdata=simulate(sm, nsim=nsim, seed=seed)){
236 ref <- rep.int(NA, nsim)
237 for (ii in 1:nsim){
243 .get_refdist_merMod <- function(lg, sm, nsim=20, seed=NULL, argument
244 simdata=simulate(sm, nsim=nsim, seed=seed)){
311 nsim.cl <- nsim %/% cl
[all …]
H A DPB-modcomp.R214 PBmodcomp <- function(largeModel, smallModel, nsim=1000, ref=NULL, seed=NULL, cl=NULL, details=0){ argument
259 ref <- PBrefdist(largeModel, smallModel, nsim=nsim,
344 ref <- PBrefdist(largeModel, smallModel, nsim=nsim, seed=seed, cl=cl, details=details)
358 nsim <- length(ref) functionVar
373 ans <- list(test=test, type="X2test", samples=c(nsim=nsim, npos=npos), n.extreme=n.extreme, nameattr
384 function(largeModel, smallModel, h = 20, nsim = 1000, cl=1) { argument
387 nchunk <- nsim %/% chunk.size
391 ref <- c(ref, PBrefdist(largeModel, smallModel, nsim = chunk.size, cl=cl))
421 nsim <- length(ref) functionVar
435 p.PB.all <- (1 + n.extreme) / (1 + nsim)
[all …]
/dports/math/R-cran-spdep/spdep/R/
H A DlocalC.R188 gr <- punif((1:(nsim+1))/(nsim+1), 0, 1)
209 ncol=crdi, nrow=nsim)
221 res_i[5] <- probs[rank(c(res_p, Ci))[(nsim + 1L)]]
223 drnk0 <- nsim - rnk0
225 res_i[6] <- (rnk + 1.0) / (nsim + 1.0)
233 listw$weights[[i]], nsim, obs[i], alternative, probs))
239 replicate(nsim, localC(x[sample.int(length(x))], listw,
244 localC_p <- function(reps, obs, alternative, nsim) { argument
246 gr <- punif((1:(nsim+1))/(nsim+1), 0, 1)
268 drnk0 <- nsim - rnk0
[all …]
H A Dsp.mantel.R15 if(missing(nsim)) stop("nsim must be given")
18 gamres <- suppressWarnings(nsim > gamma(n + 1))
20 if (nsim < 1) stop("non-positive nsim")
77 res <- numeric(length=nsim+1)
78 for (i in 1:nsim) {
82 res[nsim+1] <- f(xs, listw.U, zero.policy=zero.policy)
85 diff <- nsim - xrank
90 pval <- punif((diff + 1)/(nsim + 1))
93 statistic <- res[nsim+1]
100 nsim+1, "\n")
[all …]
H A Dlee.mc.R5 lee.mc <- function(x, y, listw, nsim, zero.policy=NULL, argument
16 if(missing(nsim)) stop("nsim must be given")
46 gamres <- suppressWarnings(nsim > gamma(n + 1))
48 if (nsim < 1) stop("nsim too small")
81 res <- numeric(length=nsim+1)
82 for (i in 1:nsim)
88 res[nsim+1] <- lee(x, y, listw, n, S2, zero.policy)$L
91 diff <- nsim - xrank
96 pval <- punif((diff + 1)/(nsim + 1))
99 statistic <- res[nsim+1]
[all …]
H A Dlisa_perm.R1 localmoran_perm <- function(x, listw, nsim=499L, zero.policy=NULL, argument
31 gr <- punif((1:(nsim+1))/(nsim+1), 0, 1)
111 ncol=crdi, nrow=nsim)
123 xrank <- rank(c(res_p, Ii))[(nsim + 1L)]
127 drnk0 <- nsim - rnk0
129 res_i[6] <- (rnk + 1.0) / (nsim + 1.0)
146 assign("nsim", nsim, envir=env)
180 crd[i], lww[[i]], nsim, Iis[i], alternative,
256 ncol=crdi, nrow=nsim)
276 assign("nsim", nsim, envir=env)
[all …]
H A Dmoran.R98 moran.mc <- function(x, listw, nsim, zero.policy=NULL, argument
109 if(missing(nsim)) stop("nsim must be given")
129 gamres <- suppressWarnings(nsim > gamma(n + 1))
131 if (nsim < 1) stop("nsim too small")
160 res <- numeric(length=nsim+1)
163 res[nsim+1] <- moran(x, listw, n, S0, zero.policy)$I
166 diff <- nsim - xrank
171 pval <- punif((diff + 1)/(nsim + 1))
172 else pval <- punif(abs(xrank - (nsim+1)/2)/(nsim + 1), 0, 0.5,
176 statistic <- res[nsim+1]
[all …]
/dports/math/R-cran-forecast/forecast/R/
H A Dsimulate.R64 nsim <- length(innov)
101 as.integer(nsim),
279 nsim <- nrow(xreg)
298 nsim <- length(innov)
451 sim <- tail(arima.sim(model, nsim, innov = e), nsim) + xm
485 nsim <- length(innov)
583 sim <- rep_len(start, nsim) + seq_len(nsim)*simdrift + cumulative_e
710 path <- numeric(nsim)
711 for (i in 1:nsim) {
823 path <- numeric(nsim)
[all …]
/dports/math/R-cran-lme4/lme4/tests/
H A DbootMer.R13 boo01 <- bootMer(fm1, mySumm, nsim = 10) argument
14 boo02 <- bootMer(fm1, mySumm, nsim = 10, use.u = TRUE)
22 boo03 <- bootMer(fm2, mySumm, nsim = 10)
23 boo04 <- bootMer(fm2, mySumm, nsim = 10, use.u = TRUE)
28 boo05 <- bootMer(gm1, mySumm, nsim = 10)
29 boo06 <- bootMer(gm1, mySumm, nsim = 10, use.u = TRUE)
35 boo03 <- bootMer(gm2, mySumm, nsim = 10)
36 boo04 <- bootMer(gm2, mySumm, nsim = 10, use.u = TRUE)
51 boo01P <- bootMer(fm1, mySumm, nsim = 10, parallel="multicore", ncpus=2)
83 bb <- bootMer(fm3,mySumm2,nsim=10)
[all …]
/dports/math/R-cran-spdep/spdep/man/
H A Dmoran.mc.Rd10 moran.mc(x, listw, nsim, zero.policy=NULL, alternative="greater",
16 \item{nsim}{number of permutations}
43 nsim <- 99
45 sim1 <- moran.mc(COL.OLD$CRIME, listw=colw, nsim=nsim)
47 mean(sim1$res[1:nsim])
48 var(sim1$res[1:nsim])
49 summary(sim1$res[1:nsim])
53 style="W"), nsim=nsim)
54 summary(sim2$res[1:nsim])
56 style="W"), nsim=nsim)
[all …]
/dports/math/R-cran-lme4/lme4/R/
H A Dpredict.R517 .simulateFun(formula=object, nsim=nsim, seed=seed, newdata=newdata, ...)
600 stopifnot((nsim <- as.integer(nsim[1])) > 0,
674 u <- rnorm(ncol(U)*nsim)
684 matrix(rnorm(n * nsim), ncol = nsim)
711 val <- sfun(object, nsim=1, ftd = rep_len(musim, n*nsim),
718 lapply(split(val[[1]], gl(nsim, n, 2 * nsim * n)), matrix,
722 } else split(val, gl(nsim,n))
728 dim(val) <- c(n, nsim)
816 ntot <- n*nsim
829 yy <- vector("list", nsim)
[all …]
/dports/math/R-cran-statmod/statmod/R/
H A Dpower.R1 power.fisher.test <- function(p1,p2,n1,n2,alpha=0.05,nsim=100,alternative="two.sided") { argument
7 y1 <- rbinom(nsim,size=n1,prob=p1)
8 y2 <- rbinom(nsim,size=n2,prob=p2)
10 p.value <- rep(0,nsim)
11 for (i in 1:nsim) p.value[i] <- fisher.test(matrix(y[i,],2,2),alternative=alternative)$p.value
/dports/math/R/R-4.1.2/src/library/stats/tests/
H A Dsimulate.R9 simulate(fit1, nsim = 3)
14 set.seed(1); ( ys <- simulate(fit2, nsim = 3) )
20 set.seed(1); ys. <- simulate(fit2., nsim = 3)
29 simulate(fit3, nsim = 8)
39 ( ys <- simulate(fit4, nsim = 3) )
47 ( ys <- simulate(fit5, nsim = 3) )
67 ys <- simulate(fit6, nsim = 3)
84 ( ys <- simulate(fit7, nsim = 3) )

12345678910>>...47