R Under development (unstable) (2025-05-29 r88251 ucrt) -- "Unsuffered Consequences" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library('mfx') Loading required package: sandwich Loading required package: lmtest Loading required package: zoo Attaching package: 'zoo' The following objects are masked from 'package:base': as.Date, as.Date.numeric Loading required package: MASS Loading required package: betareg > > ### Name: betamfx > ### Title: Marginal effects for a beta regression. > ### Aliases: betamfx print.betamfx > > ### ** Examples > > # simulate some data > set.seed(12345) > n = 1000 > x = rnorm(n) > > # beta outcome > y = rbeta(n, shape1 = plogis(1 + 0.5 * x), shape2 = (abs(0.2*x))) > # use Smithson and Verkuilen correction > y = (y*(n-1)+0.5)/n > > data = data.frame(y,x) > betamfx(y~x|x, data=data) Call: betamfx(formula = y ~ x | x, data = data) Marginal Effects: dF/dx Std. Err. z P>|z| x 0.0225862 0.0080137 2.8184 0.004826 ** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 > > proc.time() user system elapsed 0.71 0.06 0.76