[R] Can't understand error message :-{
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Fri Mar 5 01:10:23 CET 1999
John Logsdon <j.logsdon at lancaster.ac.uk> writes:
> On 2 Mar 1999, Peter Dalgaard BSA wrote:
>
> >
> > (1) Missing values in response and/or regressors cause cases to be
> > discarded.
> > (2) Plotting which of the y's against which x's ?
> >
> > plot(mschmod$residuals ~ size94[complete.cases(mavgres,crimesch,
> > socstat,povnojob,ploinc94,aa94,hisp94,minty94,mixed94)])
> >
> > should do the trick. Or, simpler but sneakier:
> >
> > attach(sizef[rownames(mschmod$model),])
> > plot(residuals(mschmod) ~ size94)
> > detach()
> >
> > It should also work with:
> >
> > evalq(plot(residuals(mschmod) ~ size94), sizef[rownames(mschmod$model),])
> >
> > (none of the above is tested, since I don't have your data of course)
>
> The problems of plotting residuals vs fitted data/covariates where there
> are NAs caught me out a little while ago. Would it not be better if the
> fitting functions lm, glm etc and plot were consistent? Thus either (a)
> plot() omitted cases in the X or the Y which were NA before checking for
> length consistency or (b) residuals() etc included NA in the appropriate
> places.
(a) won't work if you think closer about it. (b) might. I wouldn't be
surprised if there's a rationale for the way things are now, but I
can't seem to reconstruct it. Well, there's space saving of course,
but given the waste in other areas, that is hardly a crucial point.
Possibly, consistent behaviour of drop(), etc. has something to do
with it.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list