combind
?predict
and:
expand.grid(weather=1:2,gender=c("male","female"))





----------------Contact
Details:-------------------------------------------------------
Contact me: Tal.Galili@gmail.com |  972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
----------------------------------------------------------------------------------------------




On Wed, Dec 21, 2011 at 6:59 AM, Abraham Mathew <abmathewks@gmail.com>wrote:

> Lets say I have a linear model and I want to find the average expented
> value of the dependent variable. So let's assume that I'm studying the
> price I pay for coffee.
>
> Price = B0 + B1(weather) + B2(gender) + ...
>
> What I'm trying to find is the predicted price for every possible
> combination of values in the independent variables.
>
> So Expected price when:
> weather=1, gender=male
> weather=1, gender=female
> weather=2, gender=male
> etc.
>
> Can anyone help with this problem?
>
> --
> *Abraham Mathew
> Statistical Analyst
> www.amathew.com
> 720-648-0108
> @abmathewks*
>
>        [[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.
>

	[[alternative HTML version deleted]]

