R/cte.R

Defines functions get.StatFcts get.abMat .st.err .MSE .Sn .max .min .mean

Documented in get.abMat get.StatFcts

#===================================================================================================================
#----------------------------------------- Computation -------------------------------------------------------------
#===================================================================================================================
pi2 <- pi/2
noise <- 0.1
eps <- 1e-3
tolFailure <- 1.5 # declare an estimation failed if sum(Estpar-Tpar)**2) > tolFailure
#===================================================================================================================
#------------------------------------------ Simu -------------------------------------------------------------------
#===================================================================================================================
abMat <- matrix(c(1.9,1.9,1.9,1.9,1.7,1.7,1.5,1.5,1.3,1.1,0.95,0.8,0.8,0.8,0.5,0.5,0.3,0.3,0.9,0,-0.5,-0.9,0,-0.5,0,-0.9,0,-0.5,0,0,-0.5,-0.9,0.5,-0.85,0,-0.92),ncol=2)
## Koutervelis statistics fct suggested 
.mean <- function(p,...) mean(p,na.rm=T)
.min    <- function(p,...) min(p,na.rm=T)
.max    <- function(p,...) max(p,na.rm=T)
.Sn     <- function(p,n,...) sqrt(n)*sd(p,na.rm=T)
.MSE    <- function(p,paramT,...) (1/length(p))*sum((p-paramT)**2,na.rm=T) 
.st.err <- function(p,...) sd(p,na.rm=T)/sqrt(length(p))
StatFcts <- list(mean=.mean,min=.min,max=.max,Sn=.Sn,MSE=.MSE,st.err=.st.err) 


get.abMat <- function() abMat
get.StatFcts <- function() StatFcts

Try the StableEstim package in your browser

Any scripts or data that you put into this service are public.

StableEstim documentation built on Aug. 7, 2022, 5:17 p.m.