Displaying 2 results from an estimated 2 matches for "xrinv".
Did you mean:
rinv
2001 Jul 08
1
predict.lm(...., se=T), with 1-column model matrix (PR#1018)
...r-bugs@r-project.org
The problem occurs when the model matrix has a single
column.
> elastic <- data.frame(stretch=c(46,54,48,50,44,42,52),
distance=c(183,217,189,208,178,150,249))
> elastic.lm <- lm(distance ~ -1 + stretch, data=elastic)
> predict(elastic.lm,se=T)
Error in XRinv^2 %*% rep(res.var, p) : non-conformable arguments
The fix is to replace
XRinv <- qr.Q(object$qr)[, p1]
with
XRinv <- qr.Q(object$qr)[, p1, drop=FALSE]
The statement is five lines above XRinv^2 %*% rep(res.var, p)
John Maindonald.
--please do not edit the information below--
Version:...
2010 Nov 29
2
how to calculate standard error for the predicted value from geeglm?
...;- geeglm(resp ~ trt,
data=dat,id=id,family=Gaussian,corstr="ar1",weights=weight)
Then I predicted the GEE mean and se using the following code
pred.mean <-
predict(mod,data.frame(trt=factor(unique(dat$trt),levels=levels(dat$trt)
)),se=T)
I got the error message "Error in XRinv^2 %*% rep(res.var, p) :
non-conformable arguments".
Thanks for your help,
Sue
[[alternative HTML version deleted]]