R/generate_Y_mean.lm.R

Defines functions generate_Y_mean.lm

generate_Y_mean.lm <- function(true_mean, theta, ...){
  stopifnot(is(true_mean, "lm"))
  if(is.null(true_mean[["x"]]) || is.null(true_mean[["y"]]))
    true_mean <- update(true_mean, x = TRUE, y = TRUE)
  tX <- t(true_mean[["x"]])
  return(colSums(theta*tX))
}

Try the distfreereg package in your browser

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

distfreereg documentation built on April 4, 2025, 12:30 a.m.