Hi Jean,

I did use a formula and a data frame in creating the rpart model, and the
variable names are quite simple. And rpart is definitely supported.

Best,
Jane


On Tue, May 27, 2014 at 5:44 AM, Adams, Jean <[email protected]> wrote:

> Jane,
>
> Page 9 of the reference manual,
> http://cran.r-project.org/web/packages/plotmo/plotmo.pdf, discusses this
> error.
>
> 'The work-around is to simplify or standardize the way the model function
> is called. Use a formula and a data frame, or at least explicitly name the
> variables rather than passing a matrix. Use simple variable names (so x1
> rather than dat$x1, for example).'
>
> 'If the symptoms persist after changing the way the model is called, and
> the model is not one of those listed in “Which variables are plotted”, it
> is possible that the model class is not supported by plotmo. See “Extending
> plotmo”.'
>
> Jean
>
>
> On Mon, May 26, 2014 at 7:50 PM, Jane Shevtsov <[email protected]> wrote:
>
>> I am trying to use the plotmo package to generate a partial dependence
>> plot
>> for a CART model created with rpart. When running plotmo, I get "Error:
>> get.plotmo.y returned the wrong length (got 204938 expected 205000)". The
>> rpart predict function does indeed return 204938 results, but plotmo is
>> supposed to be able to handle NA's in rpart models.  What I might do about
>> this?
>>
>> Thanks,
>> Jane
>>
>> --
>> -------------
>> Jane Shevtsov, Ph.D.
>> Mathematical Biology Curriculum Writer, UCLA
>> co-founder, www.worldbeyondborders.org
>>
>> “Those who say it cannot be done should not interfere with those who are
>> doing it.” --attributed to Robert Heinlein, George Bernard Shaw and others
>>
>>         [[alternative HTML version deleted]]
>>
>>
>> ______________________________________________
>> [email protected] 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.
>>
>>
>


-- 
-------------
Jane Shevtsov, Ph.D.
Mathematical Biology Curriculum Writer, UCLA
co-founder, www.worldbeyondborders.org

“Those who say it cannot be done should not interfere with those who are
doing it.” --attributed to Robert Heinlein, George Bernard Shaw and others

        [[alternative HTML version deleted]]

______________________________________________
[email protected] 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.

Reply via email to