search for: h_ii

Displaying 7 results from an estimated 7 matches for "h_ii".

2006 Jan 10
2
standardized residuals (rstandard & plot.lm) (PR#8468)
This bug is not quite fixed - the example from my original report now = works using R-2.2.1, but plot(Uniform, 6) does not. The bug is due to if (show[6]) { ymx <- max(cook, na.rm =3D TRUE) * 1.025 g <- hatval/(1 - hatval) # Potential division by zero here # plot(g, cook, xlim =3D c(0, max(g)), ylim =3D c(0, ymx),=20 main =3D main, xlab =3D
2005 Feb 11
1
cook's distance in weighted regression
I have a puzzle as to how R is computing Cook's distance in weighted linear regression. In this case cook's distance should be given not as in OLS case by h_ii*r_i^2/(1-hii)^2 divided by k*s^2 (1) (where r is plain unadjusted residual, k is number of parameters in model, etc. ) but rather by w_ii*h_ii*r_i^2/(1-hii)^2 divided by k*s^2, (2) i.e. has the weight in there. Apart from the divisi...
2005 Sep 13
4
plot(<lm>): new behavior in R-2.2.0 alpha
...e remaining problem I'd like to address is the "balanced AOV" situation, something probably pretty rare nowadays in real practice, but common of course in teaching ANOVA. As you may remember, in a balanced design, all observations have the same leverages h_{ii}, and the plot R_i vs h_ii is really not so useful. In that case, the cook distances CD_i = c * R_i ^2 and so CD_i vs i {the old "4-th plot in plot.lm"} is graphically identical to R_i^2 vs i. Now in that case (of identical h_ii's), I think one would really want "R_i vs i". Question to the...
2008 May 14
0
Cook's Distance in GLM (PR#9316)
...cannot be displayed. Of course when you don't know in advance that this issue will arise, there is even more reason to give a warning. So I say add the warning, Heather Martin B. Maechler wrote: > Thank you, Heather, > I've committed a version of your patch (which also works when h_ii ~= 1). > > BTW, when re-reading the code and previous postings about it, > I've been convinced _ again _ that the function *should* warn when points with > h_ii ~= 1 are suppressed. > That latter change is not yet committed. > > Martin Maechler, ETH Zurich -- Dr H Turne...
2008 Mar 09
1
Formula for whether hat value is influential?
...hat value it computes is influential (i.e., the true/false value in the "hat" column of the returned is.inf data frame). The reason I'm asking is that its results disagree with what I've just learned in my statistics class, namely that a point should be considered influential if h_ii > 2(k+1)/n, where k+1 is the number of parameters in the model and n is the number of data points. My 2(k+1)/n value would mark at least one more point influential than influence.measures does for the data set I'm looking at. I am using R 2.4.1 under Windows. (Upgrading is difficult due t...
2004 Apr 05
0
studentized deleted residuals and NA's
...- 1)) Groups 2 and 4 both have only one observation. Both the standardized residual (std.res) and studentized deleted residual (stu.del.res) are NaN for Group = 2 but both have a value for Group = 4. I would think that std.res and stu.del.res should be NaN for Group 2 and for Group 4 because 1 - h_ii = 0 for the corresponding cases. Can someone tell me why the std.res and stu.del.res are different for Group = 2 and Group = 4? I am running R 1.8.1 on a Windows XP machine. John -------------------------------------------------------------------- John Miyamoto, Dept. of Psychology, Box 35152...
2009 Mar 31
1
CV and GCV for finding smoothness parameter
I received an assignment that I have to do in R, but I'm absolutely not very good at it. The task is the following: http://www.nabble.com/file/p22804957/question8.jpg To do this, we also get the following pieces of code (not in correct order): http://www.nabble.com/file/p22804957/hints.jpg I'm terrible at this and I'm completely stuck. The model I chose can be found in here: