search for: gaussrf

Displaying 15 results from an estimated 15 matches for "gaussrf".

Did you mean: gauss
2004 Dec 28
1
RandomFields: Controling seed with GaussRF
Hi, I'm using RF to simulate a correlated variable with GaussRF set.seed=1 GaussRF(sim.kfinegrid, grid=F, model="exponential", param=c(0,0.5,0,0.2)) However when I simulate again using the same random seed I get different results. > set.seed=1 > summary(GaussRF(sim.kfinegrid, grid=F, model="exponential", param=c(0,0.5,0,0.2))) M...
2007 May 21
1
size limit in R?
Hi, Please see the email exchanges below. I am having trouble generating output that is large enough for our needs, specifically when using the GaussRF function. However, when I wrote Dr. Schlather (the author of the GaussRF function), he indicated that there is also a limit imposed by R itself. Is this something that we can overcome? Thank you very much for any assistance you may provde. Regards, Jamesina ==============Original message text=...
2007 Feb 27
0
help with NSST models in GaussRf
Hi R-Users, I am ussing GaussRf in the Random Fields Package to generate spatial-temporal fields. I am having a hard time understanding how to use the NSST model. Does anybody have some experience with this model or any of the non-separable space time models available? I got all the papers cited in the manual but I a...
2011 Apr 11
1
Comparing execution times
...ought it might be interesting for some people to look at the results. Even though are not accurate, still might be a good indicator how much improvement there can be. A.Case. The classic: for 1:100 for (i in c(1:dimz)){ print(sprintf('Creating the %d map',i)); Shadowlist[,,i]<- GaussRF(x=x, y=y, model=model, grid=TRUE,param=c(mean,variance,nugget,scale,Whit.alpha)) } user system elapsed 1825.699 303.100 1063.352 -------------------------------------------------------------------------- B.Case. Same as above but with lapply instead of for Shadowlist<-lapply(1:dimz...
2011 Apr 09
1
For->lapply->parallel apply
Dear all, I would like to ask your help understand the subsequent steps for making my program faster. The following code: Gauslist<-array(data=NA,dim=c(dimx,dimy,dimz)) for (i in c(1:dimz)){ print(sprintf('Creating the %d map',i)); Gauslist[,,i]<-f <- GaussRF(x=x, y=y, model=model, grid=TRUE,param=c(mean,variance,nugget,scale,Whit.alpha)) } creates 100 GaussMaps (each map is of 256*256 dim) and stores them in a matrix called Gauslist. This process takes too long, so I was thinking if you can help me understand what should I do to make it run in paral...
2012 Nov 12
1
How to generate a random field with truncated marginal distributions?
...stion on stackoverflow but did not get a satisfying answer. I am trying to simulate a lognormal spatial random field but I need the simulated value in a certain range. So I need some easy to use functions to generate a truncated Gaussian field to start with. To be specific, I need a function like GaussRF from the RandomFields package or grf from the geoR package to generate a random field, but I need the generated field to have a truncated marginal distributions and a correlation structure with a prescribed range. Is there an R package or functions which can do this? If there is no availabe read-to...
2005 May 19
0
Random/systematic selection of rows in a matrix
...e the error is. Thanks Ruben mcolasim7<-function(N.sim,pcell){ # Lattice definition x<-seq(1,180,1) y<-seq(1,540,1) #Gaussian process param<-c(6.63,2.24,1.82,4.36) names(param)<-c("beta","sigmasq","tausq","varphi") #Simulations loop - Function GaussRF from package RandomFields for(i in 1:N.sim){ mcola<-GaussRF(x=x,y=y,param=param,grid=TRUE,model="gauss") #Process thininng out with 'pcell': probability that the process will manifest itself for(j in 1:540){ for(k in 1:180){ if(runif(1)<pcell) mcola[k,j]<-mcola[k,j] else...
2010 Sep 06
0
How R converts data between objects
Hello everyone. I would kindly request your help concerning how R converts data between different structrures. In the following example please keep attention on the following two 1) I create f <- GaussRF(x=x, y=y, model=model, grid=TRUE,param=c(mean, variance, nugget, scale, alpha)) with image(x,y,f) and image(f) I get exactly the same image. then 2)I try to store f inside a raster layer using: r <- setValues(r,as.matrix(f)) then comes the tricky part. I am trying to use image again and g...
2011 Apr 11
1
Mclapply and print statement
...his is the parallel version of lcapply. The only problem that I seem to have is that the printf cannot print messages. The ideal to me is to have fro my function an output of the form Shadowlist<-mclapply(1:dimz, function(i) { print(sprintf('Creating the %d map',i)); GaussRF(x=x, y=y, model=model, grid=TRUE,param=c(mean,variance,nugget,scale,Whit.alpha)) } ) 'I am the processor %d and I work with the task %d',processorid,i So far I get not output from my print(sprintf(... function. What do you think I should try out? Best Regards Alex
2004 May 11
1
bad interaction between RandomFields 1.1.11 and Sweave
Not really a bug (I eventually discovered), but ... When running GaussRF()/DoSimulateRF() with n>1, the default pch="!" prints backspaces to the terminal, which causes problems (LaTeX barfs) if you're running this within an Sweave() job. Setting RFparameters(pch="") fixes the problem. Could put this in the documentation, but I don'...
2010 Sep 01
1
Looks like a bug in subsetting of a complicated object
..., an matrix list with dim c(101,101) where each element is an 3*3 matrix. I am subsetting that with a matrix coo, of dim c(100,2), of unique indices, but the resulting object has length 99, not 100 as expected. Code reproducing the problem follows: library(RandomFields) set.seed(123) sim0 <- GaussRF(x=seq(0, 100, by=1), y=seq(0, 100, by=1), grid=TRUE, model="spherical", param=c(0, 1, 0, 10), trend=NULL, n=9, gridtriple=FALSE) simmatrices <- function(arr) # arr must be an array of rank 3 { d &lt...
2007 Aug 07
2
Spatial sampling problem
Hi All, I am new in R and trying to simulate random normal 2D field with mean trend say north-south. My domain is 10x10 grid and I am trying to use mvnorm but do not know how to specify the domain and the mean field. I would appreciate any help. Cheers, SK --------------------------------- [[alternative HTML version deleted]]
2012 Feb 10
0
range and anisotropy with RandomFields
...or range, and phi is the angle of rotation. Can anyone confirm this? Also, there now seems to be no way to explicitly specify the range of the major axis (it states this in the documentation and an error will be returned if I do try to set e.g. scale=2 in the definition) . Thus when I use e.g. GaussRF() to simulate a field using the above anisotropic model definition I have no idea how the range (scale) is being determined. Does anyone now how RandomFields works in this context? Thanks. -- View this message in context: http://r.789695.n4.nabble.com/range-and-anisotropy-with-RandomFields-tp...
2010 Aug 19
0
2d kriging with anisotropy on an irregular network (RandomFields Package)
...AN IRREGULAR RAINGAUGE NETWORK, DATA SIMULATION ############################################################## model="exponential" param1 <- c("mean"=Mean,"variance"=Variance,"nugget"=0,"scale"=Range) RFparameters(PracticalRange=FALSE) data <- GaussRF(points1, grid=FALSE, model=model,param=param1) data[which(data<0)]<-0 xPoint <- runif(nbRainG,0,xMax) yPoint <- runif(nbRainG,0,yMax) MatCoord<-matrix(0,nr=nbRainG,nc=2) MatCoord[,1]<-t(xPoint) MatCoord[,2]<-t(yPoint) points2<-MatCoord dim(data)<-NULL #################...
2010 Mar 14
3
the error in DoSimulateRF function
...now loaded ------------------------------------------------------------- grf: generating grid 300 * 300 with 90000 points grf: process with 1 covariance structure(s) grf: nugget effect is: tausq= 0 grf: covariance model 1 is: spherical(sigmasq=1, phi=0.1) grf: simulation using the function GaussRF from package RandomFields Error in DoSimulateRF(n = n, reg = register, paired = paired) : .Random.seed is not an integer vector but of type 'double' I tried to trace back the source of the error but installations seem correct to me. rm(.Random.seed) does not work in my case. Can anyone p...