Iteratively estimate variance model parameter γ
Iteratively computes estimate of γ in a model with E_M(y)=x^Tβ and Var_M(y)=σ^2x^γ.
gammaFit(X, x, y, maxiter = 100, show.iter = FALSE, tol = 0.001)
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? |
tol |
size of relative difference in \hat{γ}'s between consecutive iterations
used to determine convergence. Algorithm terminates when relative difference
is less than |
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
.
A list with the components:
g.hat |
estimate of γ when iterative procedure stopped |
converged |
|
steps |
number of steps used by the algorithm |
Richard Valliant, Jill A. Dever, Frauke Kreuter
Valliant, R., Dever, J., Kreuter, F. (2013, chap. 3). Practical Tools for Designing and Weighting Survey Samples. New York: Springer.
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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.