Commit cc51570f authored by Laura Mack's avatar Laura Mack
Browse files

adjust covariates (merge requests)

parent b0b732ea
......@@ -95,6 +95,9 @@ gev.d.fit<-
# test for NA values:
if(any(is.na(xdat))) stop('xdat contains NA values. NA values need to be removed first.')
# test for finite values:
if(any(is.infinite(xdat))) stop('xdat contains non finite values. Inf and -Inf need to be removed first.')
# test if covariates matrix is given correctly
npar <- max(sapply(z$model,function(x){return(ifelse(is.null(x),0,max(x)))}))
if(any(npar>ncol(ydat),npar>0 & is.null(ydat)))stop("Not enough columns in covariates matrix 'ydat'.")
......@@ -404,7 +407,7 @@ gev.d.diag <- function(fit,subset=NULL,cols=NULL,pch=NULL,which='both',mfrow=c(1
abline(0, 1, col = 1,lwd=1)
title(title[1])
if(legend){legend('bottomright',legend = round(durs,digits = 2),pch=pch,
col = cols[1:length(durs)],title = 'Durations',ncol = 2)}
col = cols[1:length(durs)],title = 'Durations[h]',ncol = 2)}
}
if(which=='both'|which=='qq'){
# qq
......@@ -413,7 +416,7 @@ gev.d.diag <- function(fit,subset=NULL,cols=NULL,pch=NULL,which='both',mfrow=c(1
abline(0, 1, col = 1,lwd=1)
title(title[2])
if(legend){legend('bottomright',legend = round(durs,digits = 2),pch=pch,
col = cols[1:length(durs)],title = 'Durations',ncol = 2)}
col = cols[1:length(durs)],title = 'Durations [h]',ncol = 2)}
}
if(which=='both') par(mfrow=c(1,1)) # reset par
}
......
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