Nothing
library(qgcomp)
library(qgcompint)
set.seed(23)
dat2 <- simdata_quantized_emm(
outcometype="logistic",
# sample size
n = 100,
# correlation between x1 and x2,x3,...
corr=c(0.8,0.6,0.3,-0.3,-0.3,-0.3),
# model intercept
b0=-2,
# linear model coefficients for x1,x2,... at referent level of interacting variable
mainterms=c(0.3,-0.1,0.1,0.0,0.3,0.1,0.1),
# linear model coefficients for product terms between x1,x2,... and interacting variable
prodterms = c(1.0,0.0,0.0,0.0,0.2,0.2,0.2),
# type of interacting variable
ztype = "categorical",
# number of levels of exposure
q = 4,
# residual variance of y
yscale = 2.0
)
head(dat2)
table(dat2$z)
table(dat2$y)
dat2$z = as.factor(dat2$z)
qfit2 <- qgcomp.emm.noboot(y~x1,
data = dat2,
expnms = paste0("x",1:1),
emmvar = "z",
q = 4)
qfit2
qfit2$fit
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.