Nothing
## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
## ----message = FALSE----------------------------------------------------------
library(cNORM)
# Assign data to object norm.data
norm.data <- ppvt
head(norm.data)
## -----------------------------------------------------------------------------
# Generate population marginals
marginals <- data.frame(var = c("sex", "sex", "migration", "migration"),
level = c(1,2,0,1),
prop = c(0.51, 0.49, 0.65, 0.35))
head(marginals)
## ----message=FALSE------------------------------------------------------------
weights <- computeWeights(data = norm.data, population.margins = marginals)
## ----message = FALSE, results = 'hide', warning=FALSE, fig0, fig.height = 4, fig.width = 7----
norm.model <- cnorm(raw = norm.data$raw, group = norm.data$group,
weights = weights)
## -----------------------------------------------------------------------------
summary(norm.model)
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.