Movatterモバイル変換


[0]ホーム

URL:


Title:Confidence Intervals for Standardized Regression Coefficients
Version:1.0.6
Description:Generates confidence intervals for standardized regression coefficients using delta method standard errors for models fitted by lm() as described in Yuan and Chan (2011) <doi:10.1007/s11336-011-9224-6> and Jones and Waller (2015) <doi:10.1007/s11336-013-9380-y>. The package can also be used to generate confidence intervals for differences of standardized regression coefficients and as a general approach to performing the delta method. A description of the package and code examples are presented in Pesigan, Sun, and Cheung (2023) <doi:10.1080/00273171.2023.2201277>.
URL:https://github.com/jeksterslab/betaDelta,https://jeksterslab.github.io/betaDelta/
BugReports:https://github.com/jeksterslab/betaDelta/issues
License:MIT + file LICENSE
Encoding:UTF-8
LazyData:true
Depends:R (≥ 3.5.0)
Imports:numDeriv
Suggests:knitr, rmarkdown, testthat, betaSandwich
RoxygenNote:7.3.3.9000
NeedsCompilation:no
Packaged:2025-10-19 02:26:13 UTC; root
Author:Ivan Jacob Agaloos PesiganORCID iD [aut, cre, cph]
Maintainer:Ivan Jacob Agaloos Pesigan <r.jeksterslab@gmail.com>
Repository:CRAN
Date/Publication:2025-10-19 17:50:07 UTC

betaDelta: Confidence Intervals for Standardized Regression Coefficients

Description

Generates confidence intervals for standardized regression coefficients using delta method standard errors for models fitted by lm() as described in Yuan and Chan (2011)doi:10.1007/s11336-011-9224-6 and Jones and Waller (2015)doi:10.1007/s11336-013-9380-y. The package can also be used to generate confidence intervals for differences of standardized regression coefficients and as a general approach to performing the delta method. A description of the package and code examples are presented in Pesigan, Sun, and Cheung (2023)doi:10.1080/00273171.2023.2201277.

Author(s)

Maintainer: Ivan Jacob Agaloos Pesiganr.jeksterslab@gmail.com (ORCID) [copyright holder]

See Also

Useful links:


Estimate Standardized Regression Coefficientsand the Corresponding Sampling Covariance Matrix

Description

Estimate Standardized Regression Coefficientsand the Corresponding Sampling Covariance Matrix

Usage

BetaDelta(object, type = "mvn", alpha = c(0.05, 0.01, 0.001))

Arguments

object

Object of classlm.

type

Character string.Iftype = "mvn",use the multivariate normal-theory approach.Iftype = "adf",use the asymptotic distribution-free approach.

alpha

Numeric vector.Significance level\alpha.

Value

Returns an objectof classbetadelta which is a list with the following elements:

call

Function call.

args

Function arguments.

lm_process

Processedlm object.

gamma

Asymptotic covariance matrixof the sample covariance matrix.

acov

Asymptotic covariance matrixof the standardized slopes.

vcov

Sampling covariance matrixof the standardized slopes.

est

Vector of standardized slopes.

Author(s)

Ivan Jacob Agaloos Pesigan

References

Jones, J. A., & Waller, N. G. (2015).The normal-theory and asymptotic distribution-free (ADF) covariance matrixof standardized regression coefficients:Theoretical extensions and finite sample behavior.Psychometrika,80(2), 365–378.doi:10.1007/s11336-013-9380-y

Pesigan, I. J. A., Sun, R. W., & Cheung, S. F. (2023).betaDelta and betaSandwich:Confidence intervals for standardized regression coefficients in R.Multivariate Behavioral Research.doi:10.1080/00273171.2023.2201277

Yuan, K.-H., & Chan, W. (2011).Biases and standard errors of standardized regression coefficients.Psychometrika,76(4), 670–690.doi:10.1007/s11336-011-9224-6

See Also

Other Beta Delta Functions:DiffBetaDelta()

Examples

object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982)std <- BetaDelta(object)# Methods -------------------------------------------------------print(std)summary(std)coef(std)vcov(std)confint(std, level = 0.95)

Delta Method

Description

Calculates delta method sampling variance-covariance matrixfor a function of parametersusing a numerical Jacobian.

Usage

Delta(  coef,  vcov,  func,  ...,  theta = 0,  alpha = c(0.05, 0.01, 0.001),  z = TRUE,  df = NULL)

Arguments

coef

Numeric vector.Vector of parameters.

vcov

Numeric matrix.Matrix of sampling variance-covariance matrix of parameters.

func

R function.

  1. The first argumentx is the argumentcoef.

  2. The function algebraically manipulatescoefto return a new numeric vector.It is best to have a named vector as an output.

  3. The function can take additional named argumentspassed using....

...

Additional arguments to pass tofunc.

theta

Numeric vector.Parameter values when the null hypothesis is true.

alpha

Numeric vector.Significance level/s.

z

Logical.Ifz = TRUE,use the standard normal distribution.Ifz = FALSE,use the t distribution.

df

Numeric.Degrees of freedom ifz = FALSE.

Value

Returns an objectof classdeltamethod which is a list with the following elements:

call

Function call.

args

Function arguments.

coef

Estimates.

vcov

Sampling variance-covariance matrix.

jacobian

Jacobian matrix.

fun

Function used ("Delta").

Author(s)

Ivan Jacob Agaloos Pesigan

See Also

Other Delta Method Functions:DeltaGeneric()

Examples

object <- glm(  formula = vs ~ wt + disp,  family = "binomial",  data = mtcars)func <- function(x) {  y <- exp(x)  names(y) <- paste0("exp", "(", names(x), ")")  y[-1]}Delta(  coef = coef(object),  vcov = vcov(object),  func = func,  alpha = 0.05)

Delta Method (Generic Object Input)

Description

Calculates delta method sampling variance-covariance matrixfor a function of parametersusing a numerical Jacobian.

Usage

DeltaGeneric(  object,  def,  theta = 0,  alpha = c(0.05, 0.01, 0.001),  z = TRUE,  df = NULL)

Arguments

object

R object.Fitted model object withcoef andvcov methodsthat return a named vector ofestimated parameters and sampling variance-covariance matrix,respectively.

def

List of character strings.A list of defined functions of parameters.The string should be a valid R expression when parsedand should result a single value when evaluated.

theta

Numeric vector.Parameter values when the null hypothesis is true.

alpha

Numeric vector.Significance level/s.

z

Logical.Ifz = TRUE,use the standard normal distribution.Ifz = FALSE,use the t distribution.

df

Numeric.Degrees of freedom ifz = FALSE.

Value

Returns an objectof classdeltamethod which is a list with the following elements:

call

Function call.

args

Function arguments.

coef

Estimates.

vcov

Sampling variance-covariance matrix.

jacobian

Jacobian matrix.

fun

Function used ("DeltaGeneric").

Author(s)

Ivan Jacob Agaloos Pesigan

See Also

Other Delta Method Functions:Delta()

Examples

object <- glm(  formula = vs ~ wt + disp,  family = "binomial",  data = mtcars)def <- list("exp(wt)", "exp(disp)")DeltaGeneric(  object = object,  def = def,  alpha = 0.05)

Estimate Differences of Standardized Slopesand the Corresponding Sampling Covariance Matrix

Description

Estimate Differences of Standardized Slopesand the Corresponding Sampling Covariance Matrix

Usage

DiffBetaDelta(object, alpha = c(0.05, 0.01, 0.001))

Arguments

object

Object of classbetadelta,that is,the output of theBetaDelta() function.

alpha

Numeric vector.Significance level\alpha.

Value

Returns an objectof classdiffbetadelta which is a list with the following elements:

call

Function call.

fit

The argumentobject.

args

Function arguments.

vcov

Sampling covariance matrix ofdifferences of standardized slopes.

est

Vector ofdifferences of standardized slopes.

Author(s)

Ivan Jacob Agaloos Pesigan

See Also

Other Beta Delta Functions:BetaDelta()

Examples

object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982)std <- BetaDelta(object)diff <- DiffBetaDelta(std)# Methods -------------------------------------------------------print(diff)summary(diff)coef(diff)vcov(diff)confint(diff, level = 0.95)

Standardized Regression Slopes

Description

Standardized Regression Slopes

Usage

## S3 method for class 'betadelta'coef(object, ...)

Arguments

object

Object of classbetadelta.

...

additional arguments.

Value

Returns a vector of standardized regression slopes.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982)std <- BetaDelta(object)coef(std)

Estimates

Description

Estimates

Usage

## S3 method for class 'deltamethod'coef(object, ...)

Arguments

object

Object of classdeltamethod.

...

additional arguments.

Value

Returns a vector of estimates.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

object <- glm(  formula = vs ~ wt + disp,  family = "binomial",  data = mtcars)def <- list("exp(wt)", "exp(disp)")out <- DeltaGeneric(  object = object,  def = def,  alpha = 0.05)coef(out)

Differences of Standardized Regression Slopes

Description

Differences of Standardized Regression Slopes

Usage

## S3 method for class 'diffbetadelta'coef(object, ...)

Arguments

object

Object of classdiffbetadelta.

...

additional arguments.

Value

Returns a vector of differences of standardized regression slopes.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982)std <- BetaDelta(object)diff <- DiffBetaDelta(std)coef(diff)

Confidence Intervals for Standardized Regression Slopes

Description

Confidence Intervals for Standardized Regression Slopes

Usage

## S3 method for class 'betadelta'confint(object, parm = NULL, level = 0.95, ...)

Arguments

object

Object of classbetadelta.

parm

a specification of which parametersare to be given confidence intervals,either a vector of numbers or a vector of names.If missing, all parameters are considered.

level

the confidence level required.

...

additional arguments.

Value

Returns a matrix of confidence intervals.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982)std <- BetaDelta(object)confint(std, level = 0.95)

Confidence Intervals

Description

Confidence Intervals

Usage

## S3 method for class 'deltamethod'confint(object, parm = NULL, level = 0.95, ...)

Arguments

object

Object of classdeltamethod.

parm

a specification of which parametersare to be given confidence intervals,either a vector of numbers or a vector of names.If missing, all parameters are considered.

level

the confidence level required.

...

additional arguments.

Value

Returns a matrix of confidence intervals.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

object <- glm(  formula = vs ~ wt + disp,  family = "binomial",  data = mtcars)def <- list("exp(wt)", "exp(disp)")out <- DeltaGeneric(  object = object,  def = def,  alpha = 0.05)confint(out, level = 0.95)

Confidence Intervals for Differencesof Standardized Regression Slopes

Description

Confidence Intervals for Differencesof Standardized Regression Slopes

Usage

## S3 method for class 'diffbetadelta'confint(object, parm = NULL, level = 0.95, ...)

Arguments

object

Object of classdiffbetadelta.

parm

a specification of which parametersare to be given confidence intervals,either a vector of numbers or a vector of names.If missing, all parameters are considered.

level

the confidence level required.

...

additional arguments.

Value

Returns a matrix of confidence intervals.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982)std <- BetaDelta(object)diff <- DiffBetaDelta(std)confint(diff)

1982 National Academy of Sciences Doctoral Programs Data

Description

1982 National Academy of Sciences Doctoral Programs Data

Usage

nas1982

Format

Ratings of 46 doctoral programs in psychology in the USAwith the following variables:

QUALITY

Program quality ratings.

NFACUL

Number of faculty members in the program.

NGRADS

Number of program graduates.

PCTSUPP

Percentage of program graduates who received support.

PCTGRT

Percent of faculty members holding research grants.

NARTIC

Number of published articlesattributed to program faculty member.

PCTPUB

Percent of faculty with one or more published article.

References

National Research Council. (1982).An assessment of research-doctorate programs in the United States:Social and behavioral sciences.doi:10.17226/9781.Reproduced with permission from the National Academy of Sciences,Courtesy of the National Academies Press, Washington, D.C.


Print Method for an Object of Classbetadelta

Description

Print Method for an Object of Classbetadelta

Usage

## S3 method for class 'betadelta'print(x, alpha = NULL, digits = 4, ...)

Arguments

x

Object of classbetadelta.

alpha

Numeric vector.Significance level\alpha.Ifalpha = NULL,use the argumentalpha used inx.

digits

Digits to print.

...

additional arguments.

Value

Prints a matrix ofstandardized regression slopes,standard errors,test statistics,degrees of freedom,p-values,andconfidence intervals.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982)std <- BetaDelta(object)print(std)

Print Method for an Object of Classdeltamethod

Description

Print Method for an Object of Classdeltamethod

Usage

## S3 method for class 'deltamethod'print(x, alpha = NULL, digits = 4, ...)

Arguments

x

Object of classdeltamethod.

alpha

Numeric vector.Significance level\alpha.Ifalpha = NULL,use the argumentalpha used inx.

digits

Digits to print.

...

additional arguments.

Value

Returns a matrix ofcoefficients,standard errors,test statistics,degrees of freedom (if z = FALSE),p-values,andconfidence intervals.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

object <- glm(  formula = vs ~ wt + disp,  family = "binomial",  data = mtcars)def <- list("exp(wt)", "exp(disp)")out <- DeltaGeneric(  object = object,  def = def,  alpha = 0.05)print(out)

Print Method for an Object of Classdiffbetadelta

Description

Print Method for an Object of Classdiffbetadelta

Usage

## S3 method for class 'diffbetadelta'print(x, alpha = NULL, digits = 4, ...)

Arguments

x

Object of classdiffbetadelta.

alpha

Numeric vector.Significance level\alpha.Ifalpha = NULL,use the argumentalpha used inx.

digits

Digits to print.

...

additional arguments.

Value

Prints a matrix ofstandardized regression slopes,standard errors,test statistics,degrees of freedom,p-values,andconfidence intervals.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982)std <- BetaDelta(object)diff <- DiffBetaDelta(std)print(diff)

Summary Method for an Object of Classbetadelta

Description

Summary Method for an Object of Classbetadelta

Usage

## S3 method for class 'betadelta'summary(object, alpha = NULL, digits = 4, ...)

Arguments

object

Object of classbetadelta.

alpha

Numeric vector.Significance level\alpha.Ifalpha = NULL,use the argumentalpha used inobject.

digits

Digits to print.

...

additional arguments.

Value

Returns a matrix ofstandardized regression slopes,standard errors,test statistics,degrees of freedom,p-values,andconfidence intervals.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982)std <- BetaDelta(object)summary(std)

Summary Method for an Object of Classdeltamethod

Description

Summary Method for an Object of Classdeltamethod

Usage

## S3 method for class 'deltamethod'summary(object, alpha = NULL, digits = 4, ...)

Arguments

object

Object of classdeltamethod.

alpha

Numeric vector.Significance level\alpha.Ifalpha = NULL,use the argumentalpha used inobject.

digits

Digits to print.

...

additional arguments.

Value

Returns a matrix ofstandardized regression slopes,standard errors,test statistics,degrees of freedom,p-values,andconfidence intervals.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

object <- glm(  formula = vs ~ wt + disp,  family = "binomial",  data = mtcars)def <- list("exp(wt)", "exp(disp)")out <- DeltaGeneric(  object = object,  def = def,  alpha = 0.05)summary(out)

Summary Method for an Object of Classdiffbetadelta

Description

Summary Method for an Object of Classdiffbetadelta

Usage

## S3 method for class 'diffbetadelta'summary(object, alpha = NULL, digits = 4, ...)

Arguments

object

Object of classdiffbetadelta.

alpha

Numeric vector.Significance level\alpha.Ifalpha = NULL,use the argumentalpha used inobject.

digits

Digits to print.

...

additional arguments.

Value

Returns a matrix ofstandardized regression slopes,standard errors,test statistics,degrees of freedom,p-values,andconfidence intervals.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982)std <- BetaDelta(object)diff <- DiffBetaDelta(std)summary(diff)

Sampling Covariance Matrix of the Standardized Regression Slopes

Description

Sampling Covariance Matrix of the Standardized Regression Slopes

Usage

## S3 method for class 'betadelta'vcov(object, ...)

Arguments

object

Object of classbetadelta.

...

additional arguments.

Value

Returns a matrix of thevariance-covariance matrixof standardized slopes.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982)std <- BetaDelta(object)vcov(std)

Sampling Covariance Matrix

Description

Sampling Covariance Matrix

Usage

## S3 method for class 'deltamethod'vcov(object, ...)

Arguments

object

Object of classdeltamethod.

...

additional arguments.

Value

Returns a matrix of thevariance-covariance matrix.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

object <- glm(  formula = vs ~ wt + disp,  family = "binomial",  data = mtcars)def <- list("exp(wt)", "exp(disp)")out <- DeltaGeneric(  object = object,  def = def,  alpha = 0.05)vcov(out)

Sampling Covariance Matrix ofDifferences of Standardized Regression Slopes

Description

Sampling Covariance Matrix ofDifferences of Standardized Regression Slopes

Usage

## S3 method for class 'diffbetadelta'vcov(object, ...)

Arguments

object

Object of classdiffbetadelta.

...

additional arguments.

Value

Returns a matrix of thevariance-covariance matrixof differences of standardized regression slopes.

Author(s)

Ivan Jacob Agaloos Pesigan

Examples

object <- lm(QUALITY ~ NARTIC + PCTGRT + PCTSUPP, data = nas1982)std <- BetaDelta(object)diff <- DiffBetaDelta(std)vcov(diff)

[8]ページ先頭

©2009-2025 Movatter.jp