[R-sig-Geo] Fwd: help in CompRandFld package
Saman Monfared
samanmonfared1 at gmail.com
Tue May 1 15:28:10 CEST 2012
---------- Forwarded message ----------
From: Saman Monfared <samanmonfared1 at gmail.com>
Date: Tue, 1 May 2012 12:31:30 +0430
Subject: help in CompRandFld package
To: r-sig-geo <r-sig-geo at r-project.org>
Dear All.
I Try to use CompRandFld package for Spatio-temporal modeling of Irish
wind data.
I write Irish wind data in txt format. I calculate times in days
((year*365)+(month*30)+day)
and saved in a coloumn with name times. I want fit a spatio-temporal
covariance like gneiting
model.
A part of My program is :
rm(list=ls())
library(CompRandFld)
library(RandomFields)
dd<-read.table("wind.txt",header=T)
names(dd)
x <- dd$x
y <- dd$y
mean <- mean(dd$values)
sill <- 1
nugget <- 0
scale <- 3
set.seed(331)
# Define the temporal sequence:
times <- seq(1,10,1)
# Simulation of a spatio-temporal Gaussian random field:
data <- RFsim(x, y, times, corrmodel="gneiting",
param=list(mean=mean,scale_s=3,scale_t=3,sill=sill,
nugget=0,power_s=1,power_t=1,sep=0.2))$data
************************************************
Error in chol.default(varcov) :
the leading minor of order 11 is not positive definite.
Please help me.
--
Saman Monfared
Msc Student,
Department of Statistics, Shiraz University,
Shiraz 71454, Iran
Email: Samanmonfared1 at gmail.com
Tel: +98 917 5305167
--
Saman Monfared
Msc Student,
Department of Statistics, Shiraz University,
Shiraz 71454, Iran
Email: Samanmonfared1 at gmail.com
Tel: +98 917 5305167
More information about the R-sig-Geo
mailing list