Description Usage Arguments Value See Also Examples
Sets up the structure for the Prior mean and Variance Matrices using information from a classical model.
1 2 3 4 5 6 7 8 9 |
formula |
a model |
data |
a data.frame, list or environment (or object
coercible by |
subset |
a specification of the rows to be used: defaults to all
rows. This can be any valid indexing vector (see
|
na.action |
how |
drop.unused.levels |
should factors have unused levels dropped?
Defaults to |
xlev |
a named list of character vectors giving the full set of levels to be assumed for each factor. |
... |
for For |
A list with items related to the prior.
mu |
An initial version of the prior mean vector, populated with all zeros |
Sigma |
An initial version of the prior Variance-Covariance vector, populated as the diagonal identity matrix |
model |
The model frame from |
x |
The design matrix from |
Other prior utility Functions:
Prior_Check()
1 2 3 4 5 6 7 8 9 10 | ## Dobson (1990) Page 93: Randomized Controlled Trial :
counts <- c(18,17,15,20,10,20,25,13,12)
outcome <- gl(3,1,9)
treatment <- gl(3,3)
print(d.AD <- data.frame(treatment, outcome, counts))
## Step 1: Set up Prior
ps=Prior_Setup(counts ~ outcome + treatment)
mu=ps$mu
V=ps$Sigma
print(ps)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.