coef.psbcSpeedUp {psbcSpeedUp}R Documentation

coef method for class psbcSpeedUp

Description

Extract the point estimates of the regression coefficients

Usage

## S3 method for class 'psbcSpeedUp'
coef(object, type = "mean", ...)

Arguments

object

an object of class psbcSpeedUp

type

type of point estimates of regressions. One of c("mean", "median"). Default is mean

...

not used

Value

Estimated coefficients are from an object of class psbcSpeedUp. If the psbcSpeedUp specified data standardization, the fitted values are base based on standardized data.

Examples


# Load the example dataset
data("exampleData", package = "psbcSpeedUp")
p <- exampleData$p
q <- exampleData$q
survObj <- exampleData[1:3]

# Set hyperparameters
mypriorPara <- list(
  "groupInd" = 1:p, "eta0" = 0.02, "kappa0" = 1, "c0" = 2, "r" = 10 / 9,
  "delta" = 1e-05, "lambdaSq" = 1, "sigmaSq" = runif(1, 0.1, 10),
  "beta.prop.var" = 1, "beta.clin.var" = 1
)


# run Bayesian Lasso Cox
library("psbcSpeedUp")
set.seed(123)
fitBayesCox <- psbcSpeedUp(survObj,
  p = p, q = q, hyperpar = mypriorPara,
  nIter = 10, burnin = 0, outFilePath = tempdir()
)
coef(fitBayesCox)



[Package psbcSpeedUp version 2.0.6 Index]