On 12/1/06, Michelle DePrenger-Levin <DePrengM at botanicgardens.org>
wrote:> Hello,
>
> I am trying to plot lines in 3 dimensions from a multiple linear model
> to illustrate the interaction of two of the explanatory variables. I'm
> trying to use the cloud function (though I'm open to a different
> function if an easier one exists). I keep getting the error message:
>
> Error in cloud(lmPeHa061201, data = PeHa061201, cex = 0.8, main >
"Table 99: PeHa", :
> no applicable method for "cloud"
>
> I have tried to make my command look just like the examples but am at a
> loss as to why I don't have an "applicable method". I enter:
>
>
lmPeHa061201=lm(sqrtplants~sqrtPlantsPrev+Site+NumFruitedPrev+HerbPrevious+RainfallJulyJuneprev+RainfallJulyJune+
>
(Site*HerbPrevious)+(HerbPrevious*NumFruitedPrev)+(RainfallJulyJune*RainfallJulyJuneprev),
> data=PeHa061201)
>
> par.set <-
> list(axis.line = list(col = "transparent"), clip = list(panel
> FALSE))
>
> print(cloud(lmPeHa061201, data=PeHa061201, cex = .8,
> screen = list(z=20, x=-70, y=0),
> par.settings = par.set,
> distance = .4, zoom = .6))
What example does this look like exactly? Normally, the first argument
of cloud has to be a formula that looks like 'z ~ x * y'. In your
call, it is the result of a call to lm, which among other things, is
not a formula.
It's difficult to suggest alternatives without a reproducible example.
> If I could get past this error, I'd like to add a line (with abline()
> ??) to show just one (and then potentially others on the same plot) of
> the interaction factors but I'm not sure if this will work either.
Probably not. Adding stuff to 3-d plots are harder than for 2-d plots.
-Deepayan