R/RPA.dcost.R

RPA.dcost <- function (d, tau2, S) {

  #
  # S : observed probe-level signals, T x P i.e. arrays x probes
  #
  # d : assumed "real" signal for which this is a cost function
  #
  # tau2 : probe-specific variances

  R <- S - d

  -sum((1/(2*tau2))*((colSums(R)^2)/(nrow(R) + 1) - colSums(R^2)))

}

Try the RPA package in your browser

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

RPA documentation built on Nov. 8, 2020, 7:47 p.m.