Skip to content

Predicted Values #2

Open
Open

Description

@retsej22

There is a one issue about predicted values in candisc.

data(iris)
iris.mod = lm(cbind(Sepal.Length,Sepal.Width,Petal.Length,Petal.Width)~Species,data=iris)
iris.can = candisc(iris.mod, data=iris)
pred = predict(iris.can)
Error in UseMethod("predict") :
no applicable method for 'predict' applied to an object of class "candisc"

I try same thing with MASS lda
iris.lda = lda(iris[,1:4],iris$Species,data=iris)
pred = predict(iris.lda)
iris.table = table(iris$Species,pred$class)
iris.table
rstudio_2018-01-10_15-46-43

it gives this table.

You can add this function in your package.

Activity

  1. friendly commented on Jan 10, 2018

    @friendly
    Owner

    Thanks; I'll look into this.

  2. john-d-fox commented on Jan 11, 2018

    @john-d-fox
    Collaborator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions