<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Sensitivity and Specificity</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="R.css" />
</head><body>

<table width="100%" summary="page for sensspec.s"><tr><td>sensspec.s</td><td style="text-align: right;">R Documentation</td></tr></table>

<h2>Sensitivity and Specificity</h2>

<h3>Description</h3>

<p>Compute sensitivity and specificity</p>


<h3>Usage</h3>

<pre>
sensspec.s(X,etime,status,u=NULL,tt,s,vtimes,cutoff=0,fc=NULL)
</pre>


<h3>Arguments</h3>

<table summary="R argblock">
<tr valign="top"><td><code>X</code></td>
<td>
<p>n by S matrix of longitudinal score/biomarker for i-th
subject at j-th occasion (NA if unmeasured)</p>
</td></tr>
<tr valign="top"><td><code>etime</code></td>
<td>
<p>n vector with follow-up times</p>
</td></tr>
<tr valign="top"><td><code>status</code></td>
<td>
<p>n vector with event indicators</p>
</td></tr>
<tr valign="top"><td><code>u</code></td>
<td>
<p>Lower limit for evaluation of sensitivity and
specificity. Defaults to <code>max(vtimes[s])</code> (see below)</p>
</td></tr>
<tr valign="top"><td><code>tt</code></td>
<td>
<p>Upper limit (time-horizon) for evaluation of sensitivity
and specificity.</p>
</td></tr>
<tr valign="top"><td><code>s</code></td>
<td>
<p>n vector of measurements/visits to use for each subject. all(s&lt;=S)</p>
</td></tr>
<tr valign="top"><td><code>vtimes</code></td>
<td>
<p>S vector with visit times</p>
</td></tr>
<tr valign="top"><td><code>cutoff</code></td>
<td>
<p>cutoff for definining events. Defaults to <code>0</code></p>
</td></tr>
<tr valign="top"><td><code>fc</code></td>
<td>
<p>Events are defined as fc = 1. Defaults to $I(cup X(t_j)&gt;cutoff)$</p>
</td></tr>
</table>


<h3>Details</h3>

<p>Sensitivity and specificities for a time-dependent multiply-measured
marker are defined as 
</p>
<p>Se(t,c,s,u) = Pr(f_c(X(t_1),X(t_2),...,X(t_s_i))| u &lt;= T &lt;= t),
</p>
<p>and
</p>
<p>Sp(t,c,s,u) = 1-Pr(f_c(X(t_1),X(t_2),...,X(t_s_i)) | T &gt; t) 
</p>
<p>for some fixed f_c, where c is a cutoff. 
The default for f_c is that a positive diagnosis is given as soon as
any measurement among the s considered is above the threshold. 
</p>


<h3>Value</h3>

<p>A vector with the following elements: 
</p>

<table summary="Rd table">
<tr>
 <td style="text-align: left;">
	<code>sens</code> </td><td style="text-align: left;"> Sensitivity at the cutoff </td>
</tr>
<tr>
 <td style="text-align: left;">
	<code>spec</code> </td><td style="text-align: left;"> Specificity at the cutoff </td>
</tr>
<tr>
 <td style="text-align: left;">
	</td>
</tr>

</table>



<h3>Author(s)</h3>

<p>Alessio Farcomeni <a href="mailto:alessio.farcomeni@uniroma1.it">alessio.farcomeni@uniroma1.it</a></p>


<h3>References</h3>

<p>Barbati, G. and Farcomeni, A. (2017) Prognostic assessment of
repeatedly measured time-dependent biomarkers, with application to
dilated cardiomuopathy, <em>Statistical Methods \&amp; Applications</em>, in
press 
</p>


<h3>See Also</h3>

<p><cite>roc</cite>, <cite>auc</cite>, <cite>butstrap</cite>, <cite>maxauc</cite>
</p>


</body></html>
