R/CoxShugartInv.R

Defines functions CoxShugartInv

Documented in CoxShugartInv

CoxShugartInv <- function(Z,R) {
  # m <- lm (z ~ x)
  # a <- as.numeric(m$coefficients[1])
  # b <- as.numeric(m$coefficients[2])
  ZZ <- mean(Z)
  RR <- mean(R)
  b <- sum((Z-ZZ) * (R-RR))/sum((R-RR)^2)
  return(b)
  }

Try the polrep package in your browser

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

polrep documentation built on Jan. 5, 2024, 3:01 a.m.