Description Usage Arguments Details Value Author(s) See Also Examples
An update method for objects created by mcexact
when
method = 'bab'
.
1 2 3 |
object |
Output from |
... |
Alternative arguments for the update |
args |
Output from |
nosim |
The desired number of simulations to be performed in the update |
maxiter |
The maximum number of iterations allowed. |
savechain |
Saves the chain of goodness-of-fit statistics and their importance weights |
The method update.bab
calls the function bab
, which is the
engine for mcexact
when method = 'bab'
.
A list of the form outputted from mcexact
Brian S. Caffo
1 2 3 4 5 |
$conde1
15 14 10
294.8800 166.8939 238.3175
$condv1
56.78443 -39.34468 36.79749
-39.34468 51.14382 -39.59345
36.79749 -39.59345 59.74533
$dens
function (y)
sum(-lgamma(y + 1))
<environment: namespace:exactLoglinTest>
$dobs
[1] 2.985962 2.981987
$mu.hat
15 14 10 16 13 12
294.87999 166.89392 238.31746 10192.00000 63.22609 261.12001
11 9 8 7 6 5
17819.00000 167.56253 311.10608 501.68254 13677.00000 91.21138
4 3 2 1
123.77391 370.43747 95.78862 11607.00000
$n
[1] 16
$n1
[1] 3
$nosim
[1] 1000
$s
[,1]
(Intercept) 55981
res.1985NE 11929
res.1985S 18986
res.1985W 10888
res.1980NE 12197
res.1980S 18486
res.1980W 10717
factor(sym.pair)2 187
factor(sym.pair)3 538
factor(sym.pair)4 187
factor(sym.pair)5 13677
factor(sym.pair)6 740
factor(sym.pair)8 17819
$stat
function (y = NULL, mu = NULL, rowlabels = FALSE)
{
if (rowlabels)
c("deviance", "Pearson")
else {
temp <- y != 0
c(2 * sum(y[temp] * log(y[temp]/mu[temp])), sum((y -
mu)^2/mu))
}
}
<environment: namespace:exactLoglinTest>
$tdf
[1] 3
$x
(Intercept) res.1985NE res.1985S res.1985W res.1980NE res.1980S res.1980W
15 1 0 1 0 0 0 1
14 1 0 0 0 0 0 1
10 1 0 0 0 0 1 0
16 1 0 0 1 0 0 1
13 1 1 0 0 0 0 1
12 1 0 0 1 0 1 0
11 1 0 1 0 0 1 0
9 1 1 0 0 0 1 0
8 1 0 0 1 0 0 0
7 1 0 1 0 0 0 0
6 1 0 0 0 0 0 0
5 1 1 0 0 0 0 0
4 1 0 0 1 1 0 0
3 1 0 1 0 1 0 0
2 1 0 0 0 1 0 0
1 1 1 0 0 1 0 0
factor(sym.pair)2 factor(sym.pair)3 factor(sym.pair)4 factor(sym.pair)5
15 0 0 0 0
14 0 0 0 0
10 0 0 0 0
16 0 0 0 0
13 0 0 1 0
12 0 0 0 0
11 0 0 0 0
9 0 1 0 0
8 0 0 0 0
7 0 0 0 0
6 0 0 0 1
5 1 0 0 0
4 0 0 1 0
3 0 1 0 0
2 1 0 0 0
1 0 0 0 0
factor(sym.pair)6 factor(sym.pair)8
15 0 0
14 0 0
10 1 0
16 0 0
13 0 0
12 0 0
11 0 1
9 0 0
8 0 0
7 1 0
6 0 0
5 0 0
4 0 0
3 0 0
2 0 0
1 0 0
$x1
(Intercept) res.1985NE res.1985S res.1985W res.1980NE res.1980S res.1980W
15 1 0 1 0 0 0 1
14 1 0 0 0 0 0 1
10 1 0 0 0 0 1 0
factor(sym.pair)2 factor(sym.pair)3 factor(sym.pair)4 factor(sym.pair)5
15 0 0 0 0
14 0 0 0 0
10 0 0 0 0
factor(sym.pair)6 factor(sym.pair)8
15 0 0
14 0 0
10 1 0
$x2invt
(Intercept) res.1985NE res.1985S res.1985W res.1980NE res.1980S res.1980W
16 -1 0.5 0 1 0.5 0 1
13 1 -0.5 0 -1 -0.5 0 0
12 0 0.0 1 0 0.0 1 0
11 0 0.0 0 0 0.0 0 0
9 0 0.0 -1 0 0.0 0 0
8 2 -1.0 -1 -1 -1.0 -1 -1
7 0 0.0 0 0 0.0 0 0
6 0 0.0 0 0 0.0 0 0
5 -1 1.0 1 1 0.0 0 0
4 -1 0.5 0 1 0.5 0 0
3 0 0.0 1 0 0.0 0 0
2 1 -1.0 -1 -1 0.0 0 0
1 0 0.5 0 0 0.5 0 0
factor(sym.pair)2 factor(sym.pair)3 factor(sym.pair)4 factor(sym.pair)5
16 0.5 0.5 -0.5 1
13 -0.5 -0.5 0.5 -1
12 0.0 -1.0 0.0 0
11 0.0 0.0 0.0 0
9 0.0 1.0 0.0 0
8 -1.0 0.0 0.0 -2
7 0.0 0.0 0.0 0
6 0.0 0.0 0.0 1
5 1.0 0.0 0.0 1
4 0.5 0.5 0.5 1
3 0.0 0.0 0.0 0
2 0.0 0.0 0.0 -1
1 -0.5 -0.5 -0.5 0
factor(sym.pair)6 factor(sym.pair)8
16 1 1
13 -1 -1
12 -1 -2
11 0 1
9 1 1
8 -1 0
7 1 0
6 0 0
5 0 0
4 1 1
3 -1 -1
2 0 0
1 0 0
$y
15 14 10 16 13 12 11 9 8 7 6 5 4
286 176 225 10192 63 270 17819 172 302 515 13677 87 124
3 2 1
366 100 11607
$ord
[1] 15 14 10 16 13 12 11 9 8 7 6 5 4 3 2 1
$glm.fit
Call: glm(formula = formula, family = poisson, data = data, x = TRUE,
y = TRUE)
Coefficients:
(Intercept) res.1985NE res.1985S res.1985W
1.6281 3.8411 0.5692 4.1120
res.1980NE res.1980S res.1980W factor(sym.pair)2
3.8901 -0.1752 3.4892 -0.9561
factor(sym.pair)3 factor(sym.pair)4 factor(sym.pair)5 factor(sym.pair)6
-0.1728 -4.8118 7.8953 4.0206
factor(sym.pair)7 factor(sym.pair)8 factor(sym.pair)9 factor(sym.pair)10
NA 7.7658 NA NA
Degrees of Freedom: 15 Total (i.e. Null); 3 Residual
Null Deviance: 131000
Residual Deviance: 2.986 AIC: 159.2
$maxiter
[1] 1000
$startiter
[1] 994
$sumdw
[1] 237.1418 235.6738
$sumdwsq
[1] 289.0064 286.8513
$sumw
[1] 616.3756
$sumwsq
[1] 865.8051
$impconst
[1] -466390.8
$phat
[1] 0.3847359 0.3823542
$mcse
[1] 0.01405482 0.01402910
$perpos
[1] 0.993
attr(,"class")
[1] "babSummary"
$conde1
15 14 10
294.8800 166.8939 238.3175
$condv1
56.78443 -39.34468 36.79749
-39.34468 51.14382 -39.59345
36.79749 -39.59345 59.74533
$dens
function (y)
sum(-lgamma(y + 1))
<environment: namespace:exactLoglinTest>
$dobs
[1] 2.985962 2.981987
$mu.hat
15 14 10 16 13 12
294.87999 166.89392 238.31746 10192.00000 63.22609 261.12001
11 9 8 7 6 5
17819.00000 167.56253 311.10608 501.68254 13677.00000 91.21138
4 3 2 1
123.77391 370.43747 95.78862 11607.00000
$n
[1] 16
$n1
[1] 3
$nosim
[1] 10000
$s
[,1]
(Intercept) 55981
res.1985NE 11929
res.1985S 18986
res.1985W 10888
res.1980NE 12197
res.1980S 18486
res.1980W 10717
factor(sym.pair)2 187
factor(sym.pair)3 538
factor(sym.pair)4 187
factor(sym.pair)5 13677
factor(sym.pair)6 740
factor(sym.pair)8 17819
$stat
function (y = NULL, mu = NULL, rowlabels = FALSE)
{
if (rowlabels)
c("deviance", "Pearson")
else {
temp <- y != 0
c(2 * sum(y[temp] * log(y[temp]/mu[temp])), sum((y -
mu)^2/mu))
}
}
<environment: namespace:exactLoglinTest>
$tdf
[1] 3
$x
(Intercept) res.1985NE res.1985S res.1985W res.1980NE res.1980S res.1980W
15 1 0 1 0 0 0 1
14 1 0 0 0 0 0 1
10 1 0 0 0 0 1 0
16 1 0 0 1 0 0 1
13 1 1 0 0 0 0 1
12 1 0 0 1 0 1 0
11 1 0 1 0 0 1 0
9 1 1 0 0 0 1 0
8 1 0 0 1 0 0 0
7 1 0 1 0 0 0 0
6 1 0 0 0 0 0 0
5 1 1 0 0 0 0 0
4 1 0 0 1 1 0 0
3 1 0 1 0 1 0 0
2 1 0 0 0 1 0 0
1 1 1 0 0 1 0 0
factor(sym.pair)2 factor(sym.pair)3 factor(sym.pair)4 factor(sym.pair)5
15 0 0 0 0
14 0 0 0 0
10 0 0 0 0
16 0 0 0 0
13 0 0 1 0
12 0 0 0 0
11 0 0 0 0
9 0 1 0 0
8 0 0 0 0
7 0 0 0 0
6 0 0 0 1
5 1 0 0 0
4 0 0 1 0
3 0 1 0 0
2 1 0 0 0
1 0 0 0 0
factor(sym.pair)6 factor(sym.pair)8
15 0 0
14 0 0
10 1 0
16 0 0
13 0 0
12 0 0
11 0 1
9 0 0
8 0 0
7 1 0
6 0 0
5 0 0
4 0 0
3 0 0
2 0 0
1 0 0
$x1
(Intercept) res.1985NE res.1985S res.1985W res.1980NE res.1980S res.1980W
15 1 0 1 0 0 0 1
14 1 0 0 0 0 0 1
10 1 0 0 0 0 1 0
factor(sym.pair)2 factor(sym.pair)3 factor(sym.pair)4 factor(sym.pair)5
15 0 0 0 0
14 0 0 0 0
10 0 0 0 0
factor(sym.pair)6 factor(sym.pair)8
15 0 0
14 0 0
10 1 0
$x2invt
(Intercept) res.1985NE res.1985S res.1985W res.1980NE res.1980S res.1980W
16 -1 0.5 0 1 0.5 0 1
13 1 -0.5 0 -1 -0.5 0 0
12 0 0.0 1 0 0.0 1 0
11 0 0.0 0 0 0.0 0 0
9 0 0.0 -1 0 0.0 0 0
8 2 -1.0 -1 -1 -1.0 -1 -1
7 0 0.0 0 0 0.0 0 0
6 0 0.0 0 0 0.0 0 0
5 -1 1.0 1 1 0.0 0 0
4 -1 0.5 0 1 0.5 0 0
3 0 0.0 1 0 0.0 0 0
2 1 -1.0 -1 -1 0.0 0 0
1 0 0.5 0 0 0.5 0 0
factor(sym.pair)2 factor(sym.pair)3 factor(sym.pair)4 factor(sym.pair)5
16 0.5 0.5 -0.5 1
13 -0.5 -0.5 0.5 -1
12 0.0 -1.0 0.0 0
11 0.0 0.0 0.0 0
9 0.0 1.0 0.0 0
8 -1.0 0.0 0.0 -2
7 0.0 0.0 0.0 0
6 0.0 0.0 0.0 1
5 1.0 0.0 0.0 1
4 0.5 0.5 0.5 1
3 0.0 0.0 0.0 0
2 0.0 0.0 0.0 -1
1 -0.5 -0.5 -0.5 0
factor(sym.pair)6 factor(sym.pair)8
16 1 1
13 -1 -1
12 -1 -2
11 0 1
9 1 1
8 -1 0
7 1 0
6 0 0
5 0 0
4 1 1
3 -1 -1
2 0 0
1 0 0
$y
15 14 10 16 13 12 11 9 8 7 6 5 4
286 176 225 10192 63 270 17819 172 302 515 13677 87 124
3 2 1
366 100 11607
$ord
[1] 15 14 10 16 13 12 11 9 8 7 6 5 4 3 2 1
$glm.fit
Call: glm(formula = formula, family = poisson, data = data, x = TRUE,
y = TRUE)
Coefficients:
(Intercept) res.1985NE res.1985S res.1985W
1.6281 3.8411 0.5692 4.1120
res.1980NE res.1980S res.1980W factor(sym.pair)2
3.8901 -0.1752 3.4892 -0.9561
factor(sym.pair)3 factor(sym.pair)4 factor(sym.pair)5 factor(sym.pair)6
-0.1728 -4.8118 7.8953 4.0206
factor(sym.pair)7 factor(sym.pair)8 factor(sym.pair)9 factor(sym.pair)10
NA 7.7658 NA NA
Degrees of Freedom: 15 Total (i.e. Null); 3 Residual
Null Deviance: 131000
Residual Deviance: 2.986 AIC: 159.2
$maxiter
[1] 1e+06
$startiter
[1] 10994
$sumdw
[1] 2721.215 2711.367
$sumdwsq
[1] 3875.555 3865.072
$sumw
[1] 7174.347
$sumwsq
[1] 10662.93
$impconst
[1] -466390.8
$phat
[1] 0.3792979 0.3779253
$mcse
[1] 0.004520627 0.004517877
$perpos
[1] 1
attr(,"class")
[1] "babSummary"
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.