Commit 1129817f authored by Le Roux Erwan's avatar Le Roux Erwan
Browse files

[projection snowfall] add modification to try to account for gcm parameters, without success

parent 82067f5c
No related merge requests found
Showing with 11 additions and 6 deletions
+11 -6
...@@ -17,13 +17,16 @@ x_gev <- rgev(N, loc = loc, scale = scale, shape = shape) ...@@ -17,13 +17,16 @@ x_gev <- rgev(N, loc = loc, scale = scale, shape = shape)
# N <- 50 # N <- 50
# loc = 0; scale = 1; shape <- 0.1 # loc = 0; scale = 1; shape <- 0.1
# x_gev <- rgev(N, loc = loc, scale = scale, shape = shape) # x_gev <- rgev(N, loc = loc, scale = scale, shape = shape)
coord <- matrix(ncol=1, nrow = N) coord <- matrix(ncol=3, nrow = N)
coord[,1]=seq(0,N-1,1) coord[,1]=seq(0,N-1,1)
colnames(coord) = c("T") coord[,2]=c(rep(0, N/2), rep(1, N/2))
coord[,3]=c(rep(1, N/2), rep(0, N/2))
colnames(coord) = c("T", "G1", "G2")
print(coord)
coord = data.frame(coord, stringsAsFactors = TRUE) coord = data.frame(coord, stringsAsFactors = TRUE)
# res = fevd_fixed(x_gev, data=coord, method='MLE', verbose=TRUE, use.phi=FALSE) # res = fevd_fixed(x_gev, data=coord, method='MLE', verbose=TRUE, use.phi=FALSE)
# res = fevd_fixed(x_gev, data=coord, location.fun= ~T, scale.fun= ~T, method='MLE', type="GEV", verbose=FALSE, use.phi=FALSE) # res = fevd_fixed(x_gev, data=coord, location.fun= ~T, scale.fun= ~T, method='MLE', type="GEV", verbose=FALSE, use.phi=FALSE)
res = fevd_fixed(x_gev, data=coord, shape.fun= ~poly(T, 2), method='MLE', type="GEV", verbose=FALSE, use.phi=FALSE) res = fevd_fixed(x_gev, data=coord, shape.fun= ~1 + (G1-G2) + I(G2), method='MLE', type="GEV", verbose=FALSE, use.phi=FALSE)
print(res) print(res)
# Some display for the results # Some display for the results
...@@ -31,8 +34,10 @@ print(res) ...@@ -31,8 +34,10 @@ print(res)
# print(class(res$chain.info)) # print(class(res$chain.info))
# print(dim(m)) # print(dim(m))
# print(m) # print(m)
print("here1")
print(res$results$par) print(res$results$par)
# print(res$par) print("here2")
print(res$par)
# print(m[1]) # print(m[1])
...@@ -44,8 +49,8 @@ print(res$results$par) ...@@ -44,8 +49,8 @@ print(res$results$par)
# print(res_ci) # print(res_ci)
# Bug to solve for the non stationary - the returned parameter do not match with the return level # Bug to solve for the non stationary - the returned parameter do not match with the return level
v = make.qcov(res, vals = list(mu1 = c(0.0))) # v = make.qcov(res, vals = list(mu1 = c(0.0)))
# print(res$results$num.pars$location) print(res$results$num.pars$location)
# print(res$results$num.pars$scale) # print(res$results$num.pars$scale)
# print(res$results$num.pars$shape) # print(res$results$num.pars$shape)
# res$results$num.pars$shape = 0 # res$results$num.pars$shape = 0
......
Supports Markdown
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