Learn R Programming

PracTools (version 1.6)

gamEst: Estimate variance model parameter \(\gamma\)

Description

Regresses a y on a set of covariates X where \(Var_M(y)=\sigma^2x^\gamma\) and then regresses the squared residuals on \(log(x)\) to estimate \(\gamma\).

Usage

gamEst(X1, x1, y1, v1)

Value

The estimate of \(\gamma\).

Arguments

X1

matrix of predictors in the linear model for y1

x1

vector of x's for individual units in the assumed specification of \(Var_M(y)\)

y1

vector of dependent variables for individual units

v1

vector proportional to \(Var_M(y)\)

Author

Richard Valliant, Jill A. Dever, Frauke Kreuter

Details

The function gamEst estimates the power \(\gamma\) in a model where the variance of the errors is proportional to \(x^\gamma\) for some covariate x. Values of \(\gamma\) are typically in [0,2]. The function is iteratively called by gammaFit, which is normally the function that an analyst should use.

References

Valliant, R., Dever, J., Kreuter, F. (2018, chap. 3). Practical Tools for Designing and Weighting Survey Samples, 2nd edition. New York: Springer.

See Also

gammaFit

Examples

Run this code
data(hospital)
x <- hospital$x
y <- hospital$y

X <- cbind(sqrt(x), x)
gamEst(X1 = X, x1 = x, y1 = y, v1 = x)

Run the code above in your browser using DataLab