R/RMS.R

Defines functions RMS

Documented in RMS

RMS <- function(warp.coef, ref, samp, B, mode)
{
  w <- B %*% warp.coef

  interp <- warp.sample(samp, w, mode)
  if (nrow(ref) == 1) {
    ref <- c(ref)
  } else {
    ref <- t(ref)
  }
  r <- interp - ref
  
  sqrt(mean(r^2, na.rm = TRUE))
}

Try the ptw package in your browser

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

ptw documentation built on Jan. 19, 2022, 5:07 p.m.