OY! Have you had any courses in linear models/regression? If so, it's the so-called "effects hierarchy" principle": generally one does not expect interactions -- 2nd order effects -- when main effects -- first order effects -- are absent.
If not, it's difficult to explain, but it certainly has nothing to do with R and you should post on a statistical list, take a course, consult a statistician, search the web, take it offlist with Peter ... -- Bert On Tue, Jun 5, 2012 at 4:47 PM, Michael <comtech....@gmail.com> wrote: > Thank you! > > But could you please explain why the 2nd formula is a model to avoid? > Thanks again! > On Tue, Jun 5, 2012 at 6:18 PM, Peter Ehlers <ehl...@ucalgary.ca> wrote: > >> You mention 3 models. In all of them, the '-1' simply removes >> the intercept term; help('formula') explains the use of '-' >> in general. >> >> 1. lm(y~ x * w - 1) is clearly explained in help('formula'); >> 2. lm(y~ x:w - 1) ditto (and this is a model to avoid); >> 3. lm(y~ x/w - 1) this is equivalent to lm(y~ x + w %in% x - 1) >> where the %in% operator is explained in help('formula'). A good >> and simple example is found in the MASS book (chapter 6) the code >> for which is available in the 'Scripts' subfolder of library/MASS >> of your R installation. >> >> Peter Ehlers >> >> >> >> On 2012-06-05 13:58, Michael wrote: >> >>> I read your website but still don't know the difference between the >>> three >>> formulas... >>> >>> Thank you! >>> >>> On Mon, Jun 4, 2012 at 11:14 PM, Joshua Wiley<jwiley.ps...@gmail.com>** >>> wrote: >>> >>> Hi Michael, >>>> >>>> This is far from exhaustive (I wrote it as an introduction some years >>>> ago) but you may find it useful to start: >>>> https://joshuawiley.com/R/**formulae_in_R.aspx<https://joshuawiley.com/R/formulae_in_R.aspx> >>>> >>>> Cheers, >>>> >>>> Josh >>>> >>>> On Mon, Jun 4, 2012 at 9:06 PM, Michael<comtech....@gmail.com> wrote: >>>> >>>>> Hi all, >>>>> >>>>> Could you please point me to good materials on various >>>>> tricks/intuitions/techniques of regression, and hopefully in R? >>>>> >>>>> For example, what does lm(y~ x * w - 1) mean vs. lm(y ~ x/w -1 ) vs. lm >>>>> >>>> (y >>>> >>>>> ~ x:w-1), etc... >>>>> >>>>> I just found that even simple linear regression is not that simple and >>>>> there are a lot of tricks/techniques in using them... >>>>> >>>>> Hopefully I can find good materials on these! >>>>> >>>>> Thank you! >>>>> >>>>> [[alternative HTML version deleted]] >>>>> >>>>> ______________________________**________________ >>>>> R-help@r-project.org mailing list >>>>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help> >>>>> PLEASE do read the posting guide >>>>> >>>> http://www.R-project.org/**posting-guide.html<http://www.r-project.org/posting-guide.html> >>>> <http://www.**r-project.org/posting-guide.**html<http://www.r-project.org/posting-guide.html>> >>>> >>>> >>>> and provide commented, minimal, self-contained, reproducible code. >>>>> >>>> >>>> >>>> >>>> -- >>>> Joshua Wiley >>>> Ph.D. Student, Health Psychology >>>> Programmer Analyst II, Statistical Consulting Group >>>> University of California, Los Angeles >>>> https://joshuawiley.com/ >>>> >>>> >>> [[alternative HTML version deleted]] >>> >>> ______________________________**________________ >>> R-help@r-project.org mailing list >>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help> >>> PLEASE do read the posting guide http://www.R-project.org/** >>> posting-guide.html <http://www.r-project.org/posting-guide.html> >>> and provide commented, minimal, self-contained, reproducible code. >>> >> >> > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. -- Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm ______________________________________________ R-help@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.