raster_se_sig | R Documentation |
Computes the one-sided confidence level, defined as (1 - p-value) x 100, for testing whether each mean (mu
) differs from zero under a normal approximation.
raster_se_sig(muvari)
muvari |
SpatRaster, of mean (location) values, variances corresponding to each |
For each element:
Calculate the standard error: se = sqrt(vari).
Compute the absolute z-score: z = abs(mu / se).
The one-sided p-value is 1 - phi(z), where phi is the CDF of the standard normal.
The confidence level is (1 - p-value) x 100 = phi(z) x 100.
A SpatRaster of confidence levels (0-100%), each rounded to one decimal place.
require(terra)
r = rast(system.file("extdata/50km_AnnMax_agcd_v1_tmax_mean_r005_daily_1980-2019.nc",
package = "loopevd"))
r2 = aggregate(r,4) #lower the resolution for a fast example
gev_r = raster_fevd(r2,"fgev")
raster_se_sig(c(gev_r$shape,gev_r$cov_9))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.