Description Usage Arguments Value Author(s) References See Also Examples
This method extracts the coefficients of estimates of an mipfp object.
1 2 |
object |
An object of class |
prop |
If this Boolean is set to |
... |
Not used. |
Coefficients of the estimates extracted from the mipfp
object
object
.
Johan Barthelemy.
Maintainer: Johan Barthelemy johan@uow.edu.au.
Chambers, J. M. and Hastie, T. J. (1992) Statistical Models in S. Wadsworth & Brooks/Cole.
coef
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | # loading the data
data(spnamur, package = "mipfp")
# subsetting the data frame, keeping only the first 3 variables
spnamur.sub <- subset(spnamur, select = Household.type:Prof.status)
# true table
true.table <- table(spnamur.sub)
# extracting the margins
tgt.v1 <- apply(true.table, 1, sum)
tgt.v1.v2 <- apply(true.table, c(1,2), sum)
tgt.v2.v3 <- apply(true.table, c(2,3), sum)
tgt.list.dims <- list(1, c(1,2), c(2,3))
tgt.data <- list(tgt.v1, tgt.v1.v2, tgt.v2.v3)
# creating the seed, a 10 pct sample of spnamur
seed.df <- spnamur.sub[sample(nrow(spnamur), round(0.10*nrow(spnamur))), ]
seed.table <- table(seed.df)
# estimating a table using ipfp
r.ipfp <- Estimate(seed=seed.table, target.list=tgt.list.dims,
target.data = tgt.data)
# exctracting and printing the coefficient of the estimates
print(coef(r.ipfp))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.