Learn Python and AI for free! One week only. No credit card needed.
Ends in:
Fits a heteroscedastic regression model using residual maximum likelihood (REML).
remlscore(y, X, Z, trace=FALSE, tol=1e-5, maxit=40)
List with the following components:
vector of regression coefficients for predicting the mean
vector of standard errors for beta
vector of regression coefficients for predicting the variance
vector of standard errors for gamma
estimated means
estimated variances
minus twice the REML log-likelihood
numeric vector of leverages
estimated covariance matrix for beta
estimated covarate matrix for gamma
number of iterations used
numeric vector of responses
design matrix for predicting the mean
design matrix for predicting the variance
Logical variable. If true then output diagnostic information at each iteration.
Convergence tolerance
Maximum number of iterations allowed
Gordon Smyth
Write
Parameters are estimated by maximizing the REML likelihood using REML scoring as described in Smyth (2002).
Smyth, G. K. (2002). An efficient algorithm for REML in heteroscedastic regression. Journal of Computational and Graphical Statistics 11, 836-847. tools:::Rd_expr_doi("10.1198/106186002871")
data(welding)
attach(welding)
y <- Strength
# Reproduce results from Table 1 of Smyth (2002)
X <- cbind(1,(Drying+1)/2,(Material+1)/2)
colnames(X) <- c("1","B","C")
Z <- cbind(1,(Material+1)/2,(Method+1)/2,(Preheating+1)/2)
colnames(Z) <- c("1","C","H","I")
out <- remlscore(y,X,Z)
cbind(Estimate=out$gamma,SE=out$se.gam)
Run the code above in your browser using DataLab