### FIRST EXAMPLE: Single case-control study
### linear trend using Hamling's method
# Inspect data
data(cc_ex)
# Fitting the model
(mod1<-dosresmeta(formula=logrr~dose,study="cc",
cov=c("n","case"),se=c("loglb","logub"),data=cc_ex))
# Parameter Estimate
mod1$Param
# Approximated Covariance Matrix
mod1$Sigma
### SECOND EXAMPLE: Multiple studies
### linear trend using Greenland and Longnecker method
### method of moments
# Inspect data
data(ex_alcohol_crc)
# Fitting the model
(mod2<-dosresmeta(formula=logrr~dose,study=c("study","type"),
cov=c("peryears","cases"),se="se",data=ex_alcohol_crc,
psmethod="gl",method="mm"))
# Summarize the results
summary(mod2)
# residual and fitted values
residuals(mod2)
fitted(mod2)
# Pseudo counts and estimated covariance matrices
mod2$psnumber
mod2$CcovRun the code above in your browser using DataLab