Description Usage Arguments Author(s) References See Also Examples

Plot SPRT boundaries against the cumulative sum of the random variable (default) or the log-likelihood ratio (when you set `log = "y"`

).

1 2 3 4 5 6 |

`x` |
an object with class |

`y` |
the y coordinates of the points in the plot, automatically populated when an object with class |

`type` |
a 1-character string for the type of plot. The following values are possible: |

`xlim` |
numeric vector of length 2, giving the x coordinates ranges. |

`ylim` |
numeric vector of length 2, giving the y coordinates ranges. |

`log` |
set |

`main` |
an overall title for the plot: see |

`sub` |
a sub title for the plot: see |

`xlab` |
a title for the x axis: see |

`ylab` |
a title for the y axis: see |

`ann` |
a logical value indicating whether to show plot and axis titles. Defaults to the current setting. |

`axes` |
a logical value indicating whether both axes should be drawn on the plot. |

`frame.plot` |
a logical indicating whether a box should be drawn around the plot. |

`panel.first` |
an 'expression' to be evaluated after the plot axes are set up but before any plotting takes place. This can be useful for drawing background grids or scatterplot smooths. Note that this works by lazy evaluation: passing this argument from other |

`panel.last` |
an expression to be evaluated after plotting has taken place but before the axes, title and box are added. See the comments about |

`asp` |
a numeric scalar giving the aspect ratio y/x. |

`col` |
a vector up to 3 elements in length. The first colour is applied to the dots, the second is applied to the H0 boundary (or B boundary if applicable) and the third is applied to the H1 boundary (or A boundary if applicable). If the vector holds 2 colours, the first colour is applied to the dots and the second is applied across boundaries. |

`lty` |
the line type. Specify the line type either as an integer (0=blank, 1=solid (default), 2=dashed, 3=dotted, 4=dotdash, 5=longdash, 6=twodash) or as a character string ( This parameter accepts a vector up to 2 elements in length. The first element is applied to the H0 boundary (or B boundary if applicable). The second element is applied to the H1 boundary (or A boundary if applicable). |

`lwd` |
the line width, a positive number, defaulting to 1. The interpretation is device-specific, and some devices do not implement line widths less than one. This parameter accepts a vector up to 2 elements in length. The first element is applied to the H0 boundary (or B boundary if applicable). The second element is applied to the H1 boundary (or A boundary if applicable). |

`...` |
other graphical parameters, such as |

Stephane Mikael Bottine

Ghosh, B.K. and Sen, P.K. (1991). *Handbook of Sequential Analysis*, Marcel Dekker, New York.
Wald, A. (1947). *Sequential Analysis*, Dover, New York.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ```
## Run the SPRT() function
test <- SPRT(distribution = "normal", type1 = 0.05, type2 = 0.20,
h0 = 0, h1 = 1, values = rnorm(10))
## Plot k vs. H0 and H1 boundaries
plot(test)
## Plot the random variable's log-likelihood ratio vs. Wald's A and B constants
plot(test, log = "y")
## Draw a line through through dots
plot(test, log = "y", type = "b")
## Change the size and appearance of the dots
plot(test, log = "y", pch = 20, cex = 1.25)
## Use difference colours for the dots and boundaries
plot(test, log = "y", pch = 20, cex = 1.25, col = c(1,2,3))
``` |

```
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.