[R] How to plot effect of x1 while controlling for x2

2010-11-15 Thread Mark Na
Hello R-helpers, Please see a self-contained example below, in which I attempt to plot the effect of x1 on y, while controlling for x2. Is there a function that does the same thing, without having to specify that x2 should be held at its mean value? It works fine for this simple example, but migh

Re: [R] How to plot effect of x1 while controlling for x2

2010-11-15 Thread Joshua Wiley
Hi Mark, If the cumbersome part is that you have to create new data to use predict, then I think the answer is "no", there is not an easier way. However, we can consider easy ways to make new data that fit with certain constraints (e.g., variables = their mean). Here's an example: ## original d

Re: [R] How to plot effect of x1 while controlling for x2

2010-11-15 Thread Greg Snow
t.org] On Behalf Of Mark Na > Sent: Monday, November 15, 2010 2:40 PM > To: r-help@r-project.org > Subject: [R] How to plot effect of x1 while controlling for x2 > > Hello R-helpers, > > Please see a self-contained example below, in which I attempt to plot > the effect of

Re: [R] How to plot effect of x1 while controlling for x2

2010-11-15 Thread Bert Gunter
ountain Healthcare > greg.s...@imail.org > 801.408.8111 > > >> -Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- >> project.org] On Behalf Of Mark Na >> Sent: Monday, November 15, 2010 2:40 PM >> To: r-help@