Re: [R] Plotting Standard Regression Fit-Am I wrong or a bug?

From: Daniel Malter <daniel_at_umd.edu>
Date: Sat, 08 Nov 2008 18:13:02 -0500


Do:

length(variablename)

where variablename is in {mats,time,quar}, i.e. do it for each of them. This will tell you. Btw: I think you might wanna pickup an introductory manual.

Btw. Peter Dalgaard pointed to the same issue regarding the plot.

Daniel



cuncta stricte discussurus

-----Ursprüngliche Nachricht-----

Von: r-help-bounces_at_r-project.org [mailto:r-help-bounces_at_r-project.org] Im Auftrag von uep
Gesendet: Saturday, November 08, 2008 5:34 PM An: r-help_at_r-project.org
Betreff: Re: [R] Plotting Standard Regression Fit-Am I wrong or a bug?

However, now a linear regression with a factor for quarterly effect doesn't want to work for me:
t2<-lm(mats~time+quar)
and I get an error message:
"Error in model.frame.default(formula = mats ~ time + quar, drop.unused.levels = TRUE) :
  variable lengths differ (found for 'quar')"

Which variable has wrong length?

Looking forward to a response
Ula

Unfortunately for me, this example works and does plot fitted line and predicted points. I really don't understand why I can't make the same commands work when trying with my real life data.

Ula

--

View this message in context:
http://www.nabble.com/Plotting-Standard-Regression-Fit-Am-I-wrong-or-a-bug-- tp20399460p20401201.html
Sent from the R help mailing list archive at Nabble.com.



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.

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 Sat 08 Nov 2008 - 23:15:17 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 Sun 09 Nov 2008 - 12:30:22 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.

list of date sections of archive