From: Barry Rowlingson <b.rowlingson_at_lancaster.ac.uk>

Date: Thu, 20 Nov 2008 22:43:33 +0000

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 20 Nov 2008 - 22:46:19 GMT

Date: Thu, 20 Nov 2008 22:43:33 +0000

2008/11/20 David Kaplan <dkaplan_at_education.wisc.edu>:

> Let me try to be more specific.

*>
**> The x y coordinates are different because of NAs in the dataset. In this
**> analysis, a set of hat values (a measure of influence in regression) is
**> given for each observation. On the basis of the regression that was run to
**> get these hat values, the sample size was 1164 (one removed due to NA). The
**> length of the data set is 1165. If I remove the NA from the data set, I can
**> get identify to run. What I would like to know is if there is a way to get
**> identify to ignore the NAs?
*

Still not clear. Your failing example was:

identify(1:1165, hatvalues(scireg3),row.names(sciach))

So are you saying that hatvalues(scireg3) is of length 1164? What you really want is for hatvalues to return NA in the places where you have missing data. identify is quite happy with NA values - try:

> x=1:10 > y=runif(10);y[5]=NA > plot(x,y) > identify(x,y)

If you can't change hatvalues to do this, then you'll just have to remove the corresponding values of 1:1165 so that it is of length 1164. So something like:

okdata = !is.na(dataset)

plot((1:1165)[okdata],hatvalues(dataset))

Barry

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 20 Nov 2008 - 22:46:19 GMT

Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.

Archive generated by hypermail 2.2.0, at Thu 20 Nov 2008 - 23:30:29 GMT.

*
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help.
Please read the posting
guide before posting to the list.
*