search for: covmodelcoeffs

Displaying 1 result from an estimated 1 matches for "covmodelcoeffs".

2008 Jan 24
2
testing coeficients of glm
...seems to be important. the R code example : ### nObs <- 10 cl <- as.factor( sample(c(1,2,3),nObs,replace=TRUE) ) y <- rnorm(nObs) model <- glm(y ~ cl) b <- model$coefficients H <- c(1,1,-1) # we want to test H0: Hb = 0 ### the following code will NOT run unless we can compute covModelCoeffs #the mean of Hb is mu = H %*% model$coefficients #the variance is HB is var = H %*% covModelCoeffs %*% t(H) p.val <- 2 * pnorm( -abs(mu), mean=0, sd=sqrt(var),lower.tail = TRUE) how do i get the covariance matrix of the estimated parameters ? thanks, peter P.S. the simple solution for this...