I believe you have missing values and therefore you need to use the argument glm(formula, data, na.action=na.exclude, ...)
?na.exclude The relevant line is when 'na.exclude' is used the residuals and predictions are padded to the correct length by inserting 'NA's for cases omitted by 'na.exclude'. Rich On Thu, Oct 20, 2016 at 7:40 AM, mviljamaa <mvilja...@kapsi.fi> wrote: > I'm using predict() for my glm() logistic model, but I'm having trouble > relating the predicted results to the rows that produced them. > > I want to be able to plot predictions along some categorical variables. > > So what can I do in order to get predicted values but also know what > variable values produced them? > > ______________________________________________ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.