dEdq_pois_noinfl {oneinfl}R Documentation

Compute Partial Derivatives of Expected Values for a Positive Poisson Model

Description

This internal function calculates the partial derivatives of expected values for a positive Poisson regression model with respect to covariates. It also computes marginal effects for specified dummy variables.

Usage

dEdq_pois_noinfl(b, X, dummies, formula)

Arguments

b

Numeric vector of coefficients for the Poisson model.

X

Matrix of predictors for the Poisson model, where rows correspond to observations and columns to covariates.

dummies

Character vector of column names from 'X' that are treated as dummy variables for which marginal effects are computed.

Details

This function: - Computes partial derivatives of expected values with respect to covariates in 'X'. - Handles marginal effects for dummy variables by modifying their values in the design matrix and computing the difference in expected values.

It is designed for internal use and assumes correct input structure. Improper inputs may result in errors or unexpected behavior.

Value

A matrix of partial derivatives (or marginal effects) with rows corresponding to observations and columns to covariates. Marginal effects for dummy variables are calculated by contrasting expected values when the dummy is set to 0 versus 1.

See Also

E_pois_noinfl for computing expected values in the positive Poisson model.


[Package oneinfl version 1.0.2 Index]