<!-- Generated by pkgdown: do not edit by hand -->
<!DOCTYPE html>
<html>
  <head>
  <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<title>Summarize a fitted variable selection model. — summary.varbvs,print.summary.varbvs • varbvs</title>

<!-- jquery -->
<script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha384-nrOSfDHtoPMzJHjVTdCopGqIqeYETSXhZDFyniQ8ZHcVy08QesyHcnOUpMpqnmWq" crossorigin="anonymous"></script>
<!-- Bootstrap -->

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<!-- Font Awesome icons -->
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-T8Gy5hrqNKT+hzMclPo118YTQO6cYprQmhrYwIiQ/3axmI1hQomh7Ud2hPOy8SP1" crossorigin="anonymous">


<!-- pkgdown -->
<link href="../pkgdown.css" rel="stylesheet">
<script src="../jquery.sticky-kit.min.js"></script>
<script src="../pkgdown.js"></script>

<!-- mathjax -->
<script src='https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML'></script>

<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->


  </head>

  <body>
    <div class="container template-reference-topic">
      <header>
      <div class="navbar navbar-default navbar-fixed-top" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar">
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="../index.html">varbvs</a>
    </div>
    <div id="navbar" class="navbar-collapse collapse">
      <ul class="nav navbar-nav">
        <li>
  <a href="../index.html">Home</a>
</li>
<li>
  <a href="../articles/index.html">Vignettes</a>
</li>
<li>
  <a href="../reference/index.html">Reference</a>
</li>
      </ul>
      
      <ul class="nav navbar-nav navbar-right">
        <li>
  <a href="http://github.com/pcarbo/varbvs">
    <span class="fa fa-github fa-lg"></span>
     
  </a>
</li>
      </ul>
    </div><!--/.nav-collapse -->
  </div><!--/.container -->
</div><!--/.navbar -->

      
      </header>

      <div class="row">
  <div class="col-md-9 contents">
    <div class="page-header">
    <h1>Summarize a fitted variable selection model.</h1>
    </div>

    
    <p>Generate a summary of the Bayesian variable selection model
  fitted using variational approximation methods.</p>
    

    <pre># S3 method for varbvs
summary(object, cred.int = 0.95, nv = 5, nr = 1000, &#8230;)
  # S3 method for summary.varbvs
print(x, digits = 3, &#8230;)</pre>
    
    <h2 class="hasAnchor" id="arguments"><a class="anchor" href="#arguments"></a> Arguments</h2>
    <table class="ref-arguments">
    <colgroup><col class="name" /><col class="desc" /></colgroup>
    <tr>
      <th>object</th>
      <td><p>Output of function <code><a href='varbvs.html'>varbvs</a></code>.</p></td>
    </tr>
    <tr>
      <th>cred.int</th>
      <td><p>Size of credible interval (number between 0 and 1).</p></td>
    </tr>
    <tr>
      <th>nv</th>
      <td><p>Show detailed statistics for top nv variables, ranked
  according to their posterior inclusion probabilities.</p></td>
    </tr>
    <tr>
      <th>nr</th>
      <td><p>Number of Monte Carlo samples to draw to estimate credible
    intervals for coefficients of selected variables.</p></td>
    </tr>
    <tr>
      <th>x</th>
      <td><p>Output of function <code>summary.varbvs</code>.</p></td>
    </tr>
    <tr>
      <th>digits</th>
      <td><p>Number of digits shown when printing posterior
    probabilities of top nv variables.</p></td>
    </tr>
    <tr>
      <th>...</th>
      <td><p>Additional print arguments.</p></td>
    </tr>
    </table>
    
    <h2 class="hasAnchor" id="details"><a class="anchor" href="#details"></a>Details</h2>

    <p>The printed summary is divided into three parts. The first part
  summarizes the data and optimization settings. It also reports the
  hyperparameter setting that yields the largest marginal
  likelihood---more precisely, the approximate marginal likelihood
  computed using the variational method. For the linear regression only
  (<code>family = "gaussian"</code>), it reports the estimated proportion of
  variance in the outcome explained by the model (PVE), and the credible
  interval of the PVE estimate brackets. Note that this is the PVE in
  the outcome after removing variance in the outcome due to linear
  effects of the covariates.</p>
<p>The second part summarizes the approximate posterior distribution of
  the hyperparameters (sigma, sa, logodds). The "estimate" column is the
  value averaged over hyperparameter settings, treating <code>objectlogw</code>
  as (unnormalized) log-marginal probabilities. The next column, labeled
  "Pr&gt;x", where <code>x = cred.int</code> gives the credible interval based on
  these weights (computed using function <code><a href='cred.html'>cred</a></code>).</p>
<p>The third part summarizes the variable selection results. This
  includes the total number of variables included in the model at
  different posterior probability thresholds, and a more detailed
  summary of the variables included in the model with highest posterior
  probability. For <code>family = "gaussian"</code>, the "PVE" column gives
  the estimated proportion of variance in the outcome explained by the
  variable (conditioned on being included in the model). Again, this is
  the PVE after removing variance in the outcome due to linear effects
  of the covariates. Finally, note that the credible intervals reported
  in the right-most column are Monte Carlo estimates, so the interval
  will be slightly different each time <code>summary</code> is called; a
  more accurate estimate can be obtained by setting input <code>nr</code> to a
  larger number, at the cost of increased computation time.</p>
    
    <h2 class="hasAnchor" id="value"><a class="anchor" href="#value"></a>Value</h2>

    <p>An object of class <code>summary.varbvs</code>, to be printed by
  <code>print.summary.varbvs</code>.</p>
    
    <h2 class="hasAnchor" id="references"><a class="anchor" href="#references"></a>References</h2>

    <p>P. Carbonetto and M. Stephens (2012). Scalable variational
inference for Bayesian variable selection in regression, and its
accuracy in genetic association studies. <em>Bayesian Analysis</em>
<b>7</b>, 73--108.</p>
    
    <h2 class="hasAnchor" id="see-also"><a class="anchor" href="#see-also"></a>See also</h2>

    <p><code><a href='varbvs.html'>varbvs</a></code>, <code><a href='varbvscoefcred.html'>varbvscoefcred</a></code></p>
    

    <h2 class="hasAnchor" id="examples"><a class="anchor" href="#examples"></a>Examples</h2>
    <pre class="examples">  <span class='co'># See help(varbvs) for examples.</span></pre>
  </div>
  <div class="col-md-3 hidden-xs hidden-sm" id="sidebar">
    <h2>Contents</h2>
    <ul class="nav nav-pills nav-stacked">
      <li><a href="#arguments">Arguments</a></li>
      
      <li><a href="#details">Details</a></li>

      <li><a href="#value">Value</a></li>

      <li><a href="#references">References</a></li>

      <li><a href="#see-also">See also</a></li>
      
      <li><a href="#examples">Examples</a></li>
    </ul>

    <h2>Author</h2>
    Peter Carbonetto <a href='mailto:peter.carbonetto@gmail.com'>peter.carbonetto@gmail.com</a>
  </div>
</div>

      <footer>
      <div class="copyright">
  <p>Developed by Peter Carbonetto, Matthew Stephens, David Gerard.</p>
</div>

<div class="pkgdown">
  <p>Site built with <a href="http://hadley.github.io/pkgdown/">pkgdown</a>.</p>
</div>

      </footer>
   </div>

  </body>
</html>
