Package 'sate'

Title: Scientific Analysis of Trial Errors (SATE)
Description: Bundles functions used to analyze the harmfulness of trial errors in criminal trials. Functions in the Scientific Analysis of Trial Errors ('SATE') package help users estimate the probability that a jury will find a defendant guilty given jurors' preferences for a guilty verdict and the uncertainty of that estimate. Users can also compare actual and hypothetical trial conditions to conduct harmful error analysis. The relationship between individual jurors' verdict preferences and the probability that a jury returns a guilty verdict has been studied by Davis (1973) <doi:10.1037/h0033951>; MacCoun & Kerr (1988) <doi:10.1037/0022-3514.54.1.21>, and Devine et el. (2001) <doi:10.1037/1076-8971.7.3.622>, among others.
Authors: Barry Edwards [aut, cre]
Maintainer: Barry Edwards <[email protected]>
License: CC0
Version: 2.2.1
Built: 2024-12-05 14:00:01 UTC
Source: CRAN

Help Index


Calculates probability a jury will find defendant guilty based on juror preferences

Description

Calculates the probability that jury of size jury_n finds defendant guilty given on preferences of jury pool (inputted as sample_pg). Does not estimate uncertainty (use as.jury.stats function for inferential statistics).

Usage

as.jury.point(
  sample_pg,
  jury_n = 12,
  pstrikes = 0,
  dstrikes = 0,
  accuracy = 0.15
)

Arguments

sample_pg

Proportion of jurors who favor a guilty verdict. Can be a single number between 0 and 1, or a vector of such numbers.

jury_n

Size of the jury (i.e. 6, 8, or 12); default value is 12.

pstrikes

Number of peremptory strikes by prosecution; default value is 0.

dstrikes

Number of peremptory strikes by defendant; default value is 0.

accuracy

Accuracy of parties' peremptory strikes; a number between 0 and 1; default value is .15.

Value

Returns the probability jury finds defendant guilty (if sample_pg is a single number) or vector of such probabilities (if sample_pg is a vector).

Examples

library(sate)
   as.jury.point(sample_pg = .50)

   as.jury.point(sample_pg = 10/12)

Calculates probability a jury will find defendant guilty based on juror preferences, with standard error and confidence interval

Description

Calculates probability jury finds defendant guilty based on verdicts preferences of jury pool. Also reports standard error and confidence interval of estimate (use as.jury.point function for estimate only).

Usage

as.jury.stats(
  sample_pg,
  sample_n,
  jury_n = 12,
  pstrikes = 0,
  dstrikes = 0,
  accuracy = 0.15,
  digits = 3
)

Arguments

sample_pg

Proportion of jurors who favor a guilty verdict; a number between 0 and 1.

sample_n

Size of sample used to estimate sample_pg.

jury_n

Size of the jury (i.e. 6, 8, or 12); default value is 12.

pstrikes

Number of peremptory strikes by prosecution; default value is 0.

dstrikes

Number of peremptory strikes by defendant; default value is 0.

accuracy

Accuracy of parties' peremptory strikes; a number between 0 and 1; default value is .15.

digits

Number of digits to report after decimal places; default value is 3.

Value

Returns the probability jury finds defendant guilty.

Examples

library(sate)
   as.jury.stats(sample_pg=.50, sample_n=830)

   as.jury.stats(sample_pg=10/12, sample_n=295)

Estimates jury-level differences based on juror-level statistics with inferential statistics

Description

Calculates jury-level statistics and differences based on juror-level statistics supplied by user.

Usage

compare.jury.stats(
  pg_actual,
  n_actual,
  pg_hypo,
  n_hypo,
  jury_n = 12,
  pstrikes = 0,
  dstrikes = 0,
  accuracy = 0.15,
  digits = 3
)

Arguments

pg_actual

The proportion of jurors who favor a guilty verdict in the actual trial condition (the trial with error).

n_actual

The size of the sample used to estimate pg_actual.

pg_hypo

The proportion of jurors who favor a guilty verdict in the hypothetical trial condition (the fair trial without error).

n_hypo

The size of the sample used to estimate pg_hypo.

jury_n

Size of the jury (i.e. 6, 8, or 12); default value is 12.

pstrikes

Number of peremptory strikes by prosecution; default value is 0.

dstrikes

Number of peremptory strikes by defendant; default value is 0.

accuracy

Accuracy of parties' peremptory strikes; a number between 0 and 1; default value is .15.

digits

Number of digits to report after decimal places; default value is 3.

Value

Returns a list of jury-level statistics to assess effect of a trial error. Returned list includes statistics for actual jury, hypothetical jury, and the difference between them.

Examples

library(sate)
   compare.jury.stats(pg_actual=.70, n_actual=400, pg_hypo=.60, n_hypo=450)

   compare.jury.stats(pg_actual=.75, n_actual=450, pg_hypo=.65, n_hypo=350,
                      jury_n=6, pstrikes=3, dstrikes=3)

Deliberation function

Description

The deliberate function returns a jury verdict based on a simulation of deliberation as a modified tug-of-war between two verdict factions. Can be called directly, but is meant to be called many times to generate verdict probabilities based on g_votes and jury_n values.

Usage

deliberate(g_votes, jury_n)

Arguments

g_votes

Initial number of votes for guilty verdict (same as K value).

jury_n

Size of the jury (i.e. 4, 6, 8, 12, or 16).

Value

Returns "G" (guilty verdict) or "NG" (not guilty verdict).

Examples

library(sate)
   deliberate(g_votes=10, jury_n=12)

   deliberate(g_votes=4, jury_n=6)

Deliberation function for civil trials (proposed)

Description

The deliberate function returns a jury verdict based on a simulation of deliberation as a tug-of-war between two verdict factions. The civil version of deliberate does not have presumption in favor of either party. Can be called directly, but is meant to be called many times to generate verdict probabilities based on p_votes and jury_n values.

Usage

deliberate.civil(p_votes, jury_n)

Arguments

p_votes

Initial number of votes for plaintiff.

jury_n

Size of the jury (i.e. 4, 6, 8, 12, or 16).

Value

Returns "P" (plaintiff verdict) or "D" (defendant verdict).

Examples

library(sate)
   deliberate.civil(p_votes=8, jury_n=12)

   deliberate.civil(p_votes=5, jury_n=6)

Calculates vector of probabilities that jury with n_jurors will return a guilty verdict

Description

Calculates a vector probabilities that a jury with n_jurors will return a guilty verdict. The vector represents P(G|k) for 0, 1, 2, ... , n_jurors where k is the number of jurors initially in favor of guilty verdict.

Usage

get_pG_by_k(n_jurors = 6)

Arguments

n_jurors

Size of the jury (i.e. 6, 8, or 12); default value is 6.

Value

Returns a vector of probabilities for guilty verdict of size n_jurors + 1.

Examples

library(sate)
   get_pG_by_k(10)

   get_pG_by_k(n_jurors=12)

Plots jury-level differences based on juror-level statistics with effect-on-defendant displayed

Description

Plots jury-level differences based on juror-level statistics supplied by user. Point estimates supplemented by confidence intervals. Effect-on-defendant also plotted.

Usage

graph.effect.defendant(
  pg_actual,
  n_actual,
  pg_hypo,
  n_hypo,
  jury_n = 12,
  pstrikes = 0,
  dstrikes = 0,
  accuracy = 0.15
)

Arguments

pg_actual

The proportion of jurors who favor a guilty verdict in the actual trial condition (the trial with error).

n_actual

The size of the sample used to estimate pg_actual.

pg_hypo

The proportion of jurors who favor a guilty verdict in the hypothetical trial condition (the fair trial without error).

n_hypo

The size of the sample used to estimate pg_hypo.

jury_n

Size of the jury (i.e. 6, 8, or 12); default value is 12.

pstrikes

Number of peremptory strikes by prosecution; default value is 0.

dstrikes

Number of peremptory strikes by defendant; default value is 0.

accuracy

Accuracy of parties' peremptory strikes; a number between 0 and 1; default value is .15.

Value

No return (creates plots)

Examples

library(sate)
   graph.effect.defendant(pg_actual=.70, n_actual=400, pg_hypo=.60, n_hypo=450)

   graph.effect.defendant(pg_actual=.75, n_actual=450, pg_hypo=.65, n_hypo=350,
                         jury_n=6, pstrikes=3, dstrikes=3)

Plots probability of a guilty verdict with confidence interval based on juror-level statistics

Description

Plots probability of guilty verdict with confidence interval based on juror-level statistics supplied by user. Similar to graph.effect.defendant, but plots one condition.

Usage

graph.estimate(
  sample_pg,
  sample_n,
  jury_n = 12,
  pstrikes = 0,
  dstrikes = 0,
  accuracy = 0.15
)

Arguments

sample_pg

The proportion of jurors who favor a guilty verdict in the sample condition

sample_n

The size of the sample used to estimate sample_pg_actual

jury_n

Size of the jury (i.e. 6, 8, or 12); default value is 12.

pstrikes

Number of peremptory strikes by prosecution; default value is 0.

dstrikes

Number of peremptory strikes by defendant; default value is 0.

accuracy

Accuracy of parties' peremptory strikes; a number between 0 and 1; default value is .15.

Value

No return (creates plot)

Examples

library(sate)
   graph.estimate(sample_pg=.70, sample_n=400)

   graph.estimate(sample_pg=.75, sample_n=450, jury_n=6, pstrikes=3, dstrikes=3)

Generates the distribution of initial votes for guilty verdict on juries

Description

Calculates and returns probability distribution of initial votes for guilty verdict from 0:jury_n with options for peremptory strikes and strike accuracy. To select jury without strikes, keep pstrikes=0 and dstrikes=0.

Usage

select.with.strikes(
  p_g,
  jury_n = 12,
  pstrikes = 0,
  dstrikes = 0,
  accuracy = 0.15
)

Arguments

p_g

The proportion of jurors in the jury pool who favor a guilty verdict

jury_n

Size of the jury (i.e. 6, 8, or 12); default value is 12.

pstrikes

Number of peremptory strikes by prosecution; default value is 0.

dstrikes

Number of peremptory strikes by defendant; default value is 0.

accuracy

Accuracy of parties' peremptory strikes; a number between 0 and 1; default value is .15.

Value

A vector of probabilities for 0:jury_n initial guilty votes

Examples

library(sate)
   select.with.strikes(p_g=.70, jury_n=6)

   select.with.strikes(p_g=.75, jury_n=12, pstrikes=6, dstrikes=10)

Estimates jury-level probability of guilty verdict based on juror-level statistics based on empirical data

Description

Returns estimate of the probability of guilty verdict based on juror-level statistics supplied by user. Also reports inferential statistics. Results are based on an empirical model with greater uncertainty than as.jury.stats function.

Usage

sim.as.jury.stats(
  sample_pg,
  sample_n,
  jury_n = 12,
  pstrikes = 0,
  dstrikes = 0,
  accuracy = 0.15,
  digits = 3,
  nDraws = 10000,
  seed = 12345
)

Arguments

sample_pg

The proportion of jurors who favor a guilty verdict in the jury pool

sample_n

The size of the sample used to estimate sample_pg

jury_n

Size of the jury (i.e. 6, 8, or 12); default value is 12.

pstrikes

Number of peremptory strikes by prosecution; default value is 0.

dstrikes

Number of peremptory strikes by defendant; default value is 0.

accuracy

Accuracy of parties' peremptory strikes; a number between 0 and 1; default value is .15.

digits

Number of digits to report after decimal places; default value is 3.

nDraws

The number of simulations used to generate results. Should be very large number (default = 10000).

seed

Set seed for random number generation for replication, default is 12345.

Value

Returns a list of jury-level statistics to assess effect of a trial error.

Examples

library(sate)
   sim.as.jury.stats(sample_pg=.50, sample_n=830, nDraws=500)

   sim.as.jury.stats(sample_pg=10/12, sample_n=295, pstrikes=6, dstrikes=10, nDraws=1000)

Estimates jury-level differences based on juror-level statistics using simulations based on empirical data

Description

Calculates jury-level differences based on juror-level statistics supplied by user. Results based on empirical data, inferential statistics produced via simulations.

Usage

sim.compare.jury.stats(
  pg_actual,
  n_actual,
  pg_hypo,
  n_hypo,
  jury_n = 12,
  digits = 3,
  pstrikes = 0,
  dstrikes = 0,
  accuracy = 0.15,
  seed = 12345,
  nDraws = 10000
)

Arguments

pg_actual

The proportion of jurors who favor a guilty verdict in the actual trial condition (the trial with error).

n_actual

The size of the sample used to estimate pg_actual.

pg_hypo

The proportion of jurors who favor a guilty verdict in the hypothetical trial condition (the fair trial without error).

n_hypo

The size of the sample used to estimate pg_hypo.

jury_n

Size of the jury (i.e. 6, 8, or 12); default value is 12.

digits

Number of digits to report after decimal places; default value is 3.

pstrikes

Number of peremptory strikes by prosecution; default value is 0.

dstrikes

Number of peremptory strikes by defendant; default value is 0.

accuracy

Accuracy of parties' peremptory strikes; a number between 0 and 1; default value is .15.

seed

Set seed for random number generation for replication, default is 12345.

nDraws

The number of simulations used to generate results. Should be very large number (default = 10000).

Value

Returns a list of jury-level statistics to assess effect of a trial error.

Examples

library(sate)
   sim.compare.jury.stats(pg_actual=.70, n_actual=400, pg_hypo=.60, n_hypo=450, nDraws=500)

   sim.compare.jury.stats(pg_actual=.75, n_actual=450, pg_hypo=.65, n_hypo=350,
                      seed=12345, nDraws=1000)