|
86 | 86 | function init!(F::UnrestrictedStationaryIdentified, method::Symbol, y::AbstractMatrix) |
87 | 87 | if method == :data |
88 | 88 | # factors and loadings via PCA |
89 | | - M = fit(PCA, y, maxoutdim = size(F), pratio = 1.0) |
| 89 | + M = fit(PCA, y, maxoutdim = nfactors(F), pratio = 1.0) |
90 | 90 | loadings(F) .= projection(M) |
91 | 91 | factors(F) .= predict(M, y) |
92 | 92 |
|
|
113 | 113 | function init!(F::UnrestrictedStationaryFull, method::Symbol, y::AbstractMatrix) |
114 | 114 | if method == :data |
115 | 115 | # factors and loadings via PCA |
116 | | - M = fit(PCA, y, maxoutdim = size(F), pratio = 1.0) |
| 116 | + M = fit(PCA, y, maxoutdim = nfactors(F), pratio = 1.0) |
117 | 117 | loadings(F) .= projection(M) |
118 | 118 | factors(F) .= predict(M, y) |
119 | 119 |
|
|
134 | 134 | function init!(F::UnrestrictedUnitRoot, method::Symbol, y::AbstractMatrix) |
135 | 135 | if method == :data |
136 | 136 | # factors and loadings via PCA |
137 | | - M = fit(PCA, y, maxoutdim = size(F), pratio = 1.0) |
| 137 | + M = fit(PCA, y, maxoutdim = nfactors(F), pratio = 1.0) |
138 | 138 | loadings(F) .= projection(M) |
139 | 139 | factors(F) .= predict(M, y) |
140 | 140 |
|
|
0 commit comments