Commit 666908b8 authored by Jana Ulrich's avatar Jana Ulrich
Browse files

small fix in IDF.agg parallelization

parent 3ee28de7
This package was submitted to CRAN on 2021-01-15.
Once it is accepted, delete this file and tag the release (commit 3ee28de).
......@@ -176,9 +176,12 @@ NULL
return(df) # maxima for single durations
}
# call function 1 in lapply to aggregate over all durations at single station
clust <- parallel::makeCluster(cl)
data.agg <- parallel::parLapply(cl = clust,ds,agg.ts)
parallel::stopCluster(clust)
if(cl>1){
clust <- parallel::makeCluster(cl,type='FORK')
data.agg <- parallel::parLapply(cl = clust,ds,agg.ts)
parallel::stopCluster(clust)
}else{data.agg <-lapply(ds,agg.ts)}
df <- do.call(rbind,data.agg)
return(df) # maxima for all durations at one station
}
......
......@@ -74,13 +74,13 @@ fit <- gev.d.fit(xdat = ann.max$xdat,ds = ann.max$ds,sigma0link = make.link('log
#> [1] 0
#>
#> $nllh
#> [1] 54.77854
#> [1] 66.68023
#>
#> $mle
#> [1] 6.040089e+00 5.513945e-01 -1.695759e-01 4.242592e-09 8.088407e-01
#> [1] 6.417126e+00 4.574141e-01 -1.141939e-02 1.514669e-09 8.020513e-01
#>
#> $se
#> [1] 3.998100e-01 7.445022e-02 5.862706e-02 2.000055e-06 1.054382e-02
#> [1] 3.957887e-01 7.238275e-02 4.930392e-02 2.000070e-06 1.125074e-02
# checking the fit
gev.d.diag(fit,pch=1,)
```
......@@ -91,8 +91,8 @@ gev.d.diag(fit,pch=1,)
# parameter estimates
params <- gev.d.params(fit)
print(params)
#> mut sigma0 xi theta eta
#> 1 6.040089 1.735672 -0.1695759 4.242592e-09 0.8088407
#> mut sigma0 xi theta eta
#> 1 6.417126 1.579983 -0.01141939 1.514669e-09 0.8020513
# plotting the probability density for a single duration
q.min <- floor(min(ann.max$xdat[ann.max$ds%in%1:2]))
......
man/figures/README-annualmax-1.png

9.5 KB | W: | H:

man/figures/README-annualmax-1.png

9.53 KB | W: | H:

man/figures/README-annualmax-1.png
man/figures/README-annualmax-1.png
man/figures/README-annualmax-1.png
man/figures/README-annualmax-1.png
  • 2-up
  • Swipe
  • Onion skin
man/figures/README-fit-1.png

43.6 KB | W: | H:

man/figures/README-fit-1.png

44.4 KB | W: | H:

man/figures/README-fit-1.png
man/figures/README-fit-1.png
man/figures/README-fit-1.png
man/figures/README-fit-1.png
  • 2-up
  • Swipe
  • Onion skin
man/figures/README-fit-2.png

23.2 KB | W: | H:

man/figures/README-fit-2.png

22.1 KB | W: | H:

man/figures/README-fit-2.png
man/figures/README-fit-2.png
man/figures/README-fit-2.png
man/figures/README-fit-2.png
  • 2-up
  • Swipe
  • Onion skin
man/figures/README-idf-1.png

32.8 KB | W: | H:

man/figures/README-idf-1.png

36.6 KB | W: | H:

man/figures/README-idf-1.png
man/figures/README-idf-1.png
man/figures/README-idf-1.png
man/figures/README-idf-1.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment