Solve model FisherEM in economics

 Solve model FisherEM in economics?

Solution;
FisherEM
Data= iris
res = fem(iris[,-5],K=3,model='DkBk',method='reg')
> res
* Model: The chosen model is DkBk with K = 3 (icl=-382.5303)
* Loading matrix (zero values are denoted by .):
                U1    U2
Sepal.Length 0.001 0.001
Sepal.Width  0.001 0.443
Petal.Length 0.625 0.001
Petal.Width  0.487 0.821
> plot(res)
log

model

liklyhood

fisher

fisher model

> fem.ari(res,as.numeric(iris[,5]))
[1] 0.7733799
> res = fem(iris[,-5],K=2:6,model='all',method='svd')
> res
* Model: The chosen model is DkB with K = 4 (icl=-318.3845)
* Loading matrix (zero values are denoted by .):
                U1    U2    U3
Sepal.Length 0.001 0.001 0.001
Sepal.Width  0.233 0.001 0.001
Petal.Length 0.001 0.465 0.001
Petal.Width  0.001 0.001 0.434
> plot(res)
> fem.ari(res,as.numeric(iris[,5]))
[1] 0.6885584

Post a Comment

0 Comments