Matrix Elements VB-800 Manuel d'utilisateur Page 100

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 172
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 99
92 Appendix A3 Modelbase and OxPack
const iPeriod2)
{ // cross-section: always select full sample
m_iT1sel = 0;
m_iT2sel = rows(m_mData) - 1;
}
BprobitEx::InitData()
{
// get and inspect the data selected for estimation
m_iT1est = m_iT1sel; m_iT2est = m_iT2sel;
m_iT1sel = 0; m_iT2sel = rows(m_mData) - 1;
// get data: Y,X,W,Sel; not using modelbase version because
// that defaults to time-series sample selection
m_mY = GetGroup(Y_VAR);
m_cY = columns(m_mY);
if (!m_cY)
{ println("\n*** Error: need explanatory variable");
return FALSE;
}
m_mX = GetGroup(X_VAR);
m_cX = columns(m_mX);
if (!m_cX)
{ println("\n*** Error: need some regressors");
return FALSE;
}
m_mW = GetGroup(W_VAR);
m_cW = columns(m_mW);
if (columns(m_mW) > 1)
{ println("\n*** Error: only one weight variable allowed");
return FALSE;
}
m_mSel = GetGroup(SEL_VAR);
m_cSel = columns(m_mSel);
if (columns(m_mSel) > 1)
{ println("\n*** Error: only one selection variable allowed");
return FALSE;
}
// check for missing values
decl vdrop = sumr(isdotmissing(m_mX));
if (m_cW) vdrop = vdrop .|| isdotmissing(m_mW);
if (m_cSel) vdrop = vdrop .|| isdotmissing(m_mSel) .|| m_mSel .== 0;
vdrop = vdrop .|| sumr(isdotmissing(m_mY));
m_mIdx = range(0, rows(m_mY) - 1)’ + m_iT1sel;
// now drop those observations with missing values
if (sumc(vdrop))
{
m_mY = deleteifr(m_mY, vdrop);
m_mX = deleteifr(m_mX, vdrop);
m_mIdx = deleteifr(m_mIdx, vdrop);
if (m_cW) m_mW = deleteifr(m_mW, vdrop);
// don’t drop from selection variable
}
Vue de la page 99
1 2 ... 95 96 97 98 99 100 101 102 103 104 105 ... 171 172

Commentaires sur ces manuels

Pas de commentaire