R/predict_Lasso_SIR.R

Defines functions predict_Lasso_SIR

Documented in predict_Lasso_SIR

predict_Lasso_SIR <- function( lassosirobj, newdata )
{
  n = dim(newdata)[1]
  p = dim(newdata)[2]
  if( is.data.frame(newdata) )
    newdata = array( unlist( data.frame(newdata)), c(n,p))

  predict_value = newdata %*% lassosirobj$beta

  list( predict_value = predict_value, beta = lassosirobj$beta, no.dim = lassosirobj$no.dim )
}

Try the LassoSIR package in your browser

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

LassoSIR documentation built on April 3, 2025, 8:49 p.m.