Skip to content

Commit

Permalink
update docs for coef and predict methods
Browse files Browse the repository at this point in the history
  • Loading branch information
stephens999 committed May 2, 2018
1 parent 9460e90 commit d29bb56
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
7 changes: 7 additions & 0 deletions R/predict.susie.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
#' @title extract regression coefficients from susie fit
#' @param s a susie fit
#' @return a p vector of estimated regression coefficients
#' @method coef susie
#' @export
coef.susie = function(s){
colSums(s$alpha*s$mu)
}

#' @title predict future observations or extract coefficients from susie fit
#' @param s a susie fit
#' @param newx a new value for X at which to do predictions
#' @param type if this is coefficients, then calls coef.susie
#' @method predict susie
#' @export
predict.susie = function(s,newx = NULL,type=c("response","coefficients")){
type <- match.arg(type)
Expand Down
17 changes: 17 additions & 0 deletions man/coef.susie.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 19 additions & 0 deletions man/predict.susie.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d29bb56

Please sign in to comment.