MyNixOS website logo
Description

Effect Estimates from All Models.

Estimates and plots effect estimates from models with all possible combinations of a list of variables. It can be used for assessing treatment effects in clinical trials or risk factors in bio-medical and epidemiological research. Like Stata command 'confall' (Wang Z (2007) <doi:10.1177/1536867X0700700203> ), 'allestimates' calculates and stores all effect estimates, and plots them against p values or Akaike information criterion (AIC) values. It currently has functions for linear regression: all_lm(), logistic and Poisson regression: all_glm(), and Cox proportional hazards regression: all_cox().

allestimates: Effect Estimates from All Possible Models

Calculates effect estimates from models with all possible combinations of a list of variables specified by users. Effect estimates can be regression coefficients, odds ratios and hazard ratios depending on modeling methods. This approach can be used for assessing treatment effects in clinical trials or the effects of a risk factor in observational biomedical and epidemiological studies.

Installation

You can install the released version of allestimates from CRAN with:

install.packages("allestimates")

Example

Using diab_df data to assess the association between marital status Married and and Diabetes as an example. Several other factors might potentially influence the association (odds ratio estimates) between Married and Diabetes variables.

library(allestimates)
data(diab_df)
diab_df$Overweight = as.numeric(diab_df$BMI >= 25)
vlist <- c("Age", "Sex", "Education","Smoke", "BMI", "Income")
results <- all_speedglm(crude = "Diabetes ~ Married",  xlist = vlist, data = diab_df)
#> estimate: Odds Ratio or Rate Ratio
#> Crude model: Diabetes ~ Married

All those possible effect estimates (odds ratios in this case) are stored in an object results and can be used later for further analysis and generating various graphs.

all_plot(results)

From this all_plot graph, we can see that all estimated odds ratio values fell in the left-side two quarters, with either a positive or a negative association but p values in all possible models were greater than 0.05.

all_plot2(results)

all_plot2 graph shows effect estimates with a specific variable being included or not included in the model. This can be helpful in combination with biological background knowledge to understand potential confounding effects, uncertainly of the effect estimates, and inappropriate inclusion of some variables.

Note: Interaction terms and other derived variables can be listed. Those terms need to be generated first before running an allestimates function.

Metadata

Version

0.2.3

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows