Matrix Elements VB-800 Instrukcja Użytkownika Strona 101

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 172
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 100
A3.5 An example 93
// set sample size
m_cT = rows(m_mY);
if (m_cT <= 2)
{ println("\n*** Error: only ", m_cT, " observations.");
return FALSE;
}
// get names of variables
GetGroupNames(Y_VAR, &m_asY);
GetGroupNames(X_VAR, &m_asX);
GetGroupNames(W_VAR, &m_asW);
GetGroupNames(SEL_VAR, &m_asSel);
// update status: data processed successsfully
m_iModelStatus = MS_DATA;
return TRUE;
}
BprobitEx::DoEstimation(vP)
{
// do the maximization using BFGS
if (m_iMethod == M_PROBIT)
m_iResult = MaxBFGS(fProbit, &vP, &m_dLogLik, 0, FALSE);
else if (m_iMethod == M_LOGIT)
println("\n*** Error: not implemented");
else if (m_iMethod == M_POISSON)
println("\n*** Error: not implemented");
else if (m_iMethod == M_NEGBIN)
println("\n*** Error: not implemented");
// maximization is done in terms of loglik/T
m_dLogLik *= m_cT;
// may need to do more processing if estimation succeeded
if (m_iResult <= MAX_WEAK_CONV)
{
++m_iModel;
}
return {vP, "BFGS", FALSE}; // three return values
}
BprobitEx::Output()
{
Buffering(11); // set text marker
Buffering(1); // start buffering
// print the header even if estimation failed
OutputHeader(GetMethodLabel());
if (m_iModelStatus != MS_ESTIMATED)
return;
// output the rest
OutputPar();
OutputLogLik();
Przeglądanie stron 100
1 2 ... 96 97 98 99 100 101 102 103 104 105 106 ... 171 172

Komentarze do niniejszej Instrukcji

Brak uwag