The R book by Michael Crawley has some discussion the type of R syntax you are looking for in the chapter on statistical modeling. As for the formulae you gave...
lm(y ~ x*w - 1) fits an interaction between x and w without an intercept, along with the main effects for x and w lm(y ~ x:w - 1) fits just the interaction between x and w without an intercept, and without the main effects for x and w lm(y ~ x/w - 1) I believe this fits the nested factor w inside of x Andrew Miles On Jun 5, 2012, at 4:58 PM, 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 >> >> 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 >>> 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. >> >> >> >> -- >> 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 > 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 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.