MyNixOS website logo
Description

Fits Regression Models When the Outcome is Partially Missing.

Implements the methods described in Bond S, Farewell V, 2006, Exact Likelihood Estimation for a Negative Binomial Regression Model with Missing Outcomes, Biometrics.

mreg

R-CMD-check Codecoveudract_pkg

The goal of mreg is to implements the techniques of exact likelihood when the discrete outcome can be missing in a regression model. It is the accompanying software to the paper Bond S, Farewell V, 2006, Exact Likelihood Estimation for a Negative Binomial Regression Model with Missing Outcomes, Biometrics

Installation

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

install.packages("mreg")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("shug0131/mreg")

Example

This is a basic example which shows you how to solve a common problem:

library(mreg)
 mod1 <- mreg( damaged~offset(log(intervisit.time))+esr.init,
 data=public,patid=ptno,print.level=1, iterlim=1000 )
#> iteration = 0
#> Step:
#> [1] 0 0 0
#> Parameter:
#> [1] 0 0 0
#> Function Value
#> [1] 3902.458
#> Gradient:
#> [1]  3066.5542   690.1451 22153.0783
#> 
#> iteration = 34
#> Parameter:
#> [1] -0.981767860 -6.696169800  0.005720807
#> Function Value
#> [1] 555.7446
#> Gradient:
#> [1] -4.469371e-05 -2.064622e-05 -2.745820e-03
#> 
#> Last global step failed to locate a point lower than x.
#> Either x is an approximate local minimum of the function,
#> the function is too non-linear for this algorithm,
#> or steptol is too large.
 mod1
#> 
#> Call:
#> mreg(formula = damaged ~ offset(log(intervisit.time)) + esr.init,     data = public, patid = ptno, iterlim = 1000, print.level = 1)
#> 
#> Coefficients:
#> (Intercept)     esr.init  
#>   -6.696170     0.005721
 summary(mod1)
#> 
#> Call:
#> mreg(formula = damaged ~ offset(log(intervisit.time)) + esr.init, 
#>     data = public, patid = ptno, iterlim = 1000, print.level = 1)
#> 
#> 
#> Coefficients:
#>              Estimate      S.E. Z-value Pr(>|Z|)    
#> (Intercept) -6.696170  0.134108 -49.931  < 2e-16 ***
#> esr.init     0.005721  0.003218   1.778   0.0755 .  
#> log.disp    -0.981768  0.146987  -6.679  2.4e-11 ***
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> 
#> Deviance:   1111.489
Metadata

Version

1.2.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • 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