R/predict.svd.R

Defines functions predict.svd

Documented in predict.svd

#' @title Predict svd regression
#'
#' @description Calculates svd regression model predictions for new data.
#'
#' @param object An object model from fun.svd an object class 'svd'
#' @param newdata matrix containing dependent variable in the model, wich the predictions are calculated.
#'
#' @return NULL
#'
#' @keywords internal
#'
predict.svd <- function(object, newdata, ...) {

  regressors.fin <- rownames(object$coef)
  newdata <- cbind("Ind" = 1, newdata)[, regressors.fin]

  return(newdata %*% object$coef)
}

Try the GMDHreg package in your browser

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

GMDHreg documentation built on July 5, 2021, 5:09 p.m.