### 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(case,n),se=c(loglb,logub),data=cc_ex))
# Parameter Estimate
mod1$Param
# Approximated Covariance Matrix
mod1$Ccov
### 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(cases,peryears),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$Ccov
Run the code above in your browser using DataLab