Iteratively estimate variance model parameter γ

Share:

Description

Iteratively computes estimate of γ in a model with E_M(y)=x^Tβ and Var_M(y)=σ^2x^γ.

Usage

1
gammaFit(X, x, y, maxiter = 100, show.iter = FALSE, tol = 0.001)

Arguments

X

matrix of predictors in the linear model for y

x

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

y

vector of dependent variables for individual units

maxiter

maximum number of iterations allowed

show.iter

should values of γ be printed of each iteration? TRUE or FALSE

tol

size of relative difference in \hat{γ}'s between consecutive iterations used to determine convergence. Algorithm terminates when relative difference is less than tol.

Details

The function gammaFit estimates the power γ in a model where the variance of the errors is proportional to x^γ for some covariate x. Values of γ are typically in [0,2]. The function calls gamEst.

Value

A list with the components:

g.hat

estimate of γ when iterative procedure stopped

converged

TRUE or FALSE depending on whether convergence was obtained

steps

number of steps used by the algorithm

Author(s)

Richard Valliant, Jill A. Dever, Frauke Kreuter

References

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

See Also

gamEst

Examples

1
2
3
4
5
6
data(hospital)
x <- hospital$x
y <- hospital$y

X <- cbind(sqrt(x), x)
gammaFit(X = X, x = x, y = y, maxiter=100, tol=0.001)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.