Example C3 Binary response model

 

Raudenbush and Bhumirat (1992) analysed data on children repeating a grade during their time at primary school. The data were from a national survey of primary education in Thailand in 1988, we use a sub set of that data here.

 

 

Reference

 

Raudenbush, S.W., Bhumirat, C., 1992. The distribution of resources for primary education and its consequences for educational achievement in Thailand, International Journal of Educational Research, 17, 143-164

 

 

Data description

 

Number of observations (rows): 7185

Number of variables (columns): 4

 

The variables include the following:

 

schoolid =school identifier

sex= 1 if child is male, 0 otherwise

pped=1 if the child had pre primary experience, 0 otherwise

repeat=1 if the child repeated a grade during primary school, 0 otherwise

 

 

The first few lines of thaieduc1.dat look like

 

 

 

 

Sabre commands

 

out thaieduc.log

trace thaieduc.trace

data schoolid sex pped repeat

read thaieduc1.dat

case schoolid

yvar repeat

constant cons

lfit cons

dis m

dis e

fit cons

dis m

dis e

data schoolid sex pped repeat msesc

read thaieduc2.dat

case schoolid

yvar repeat

constant cons

lfit msesc sex pped cons

dis m

dis e

fit msesc sex pped cons

dis m

dis e

stop

 

 

Sabre log file

 

<S> trace thaieduc.trace

<S> data schoolid sex pped repeat

<S> read thaieduc1.dat

 

       8582 observations in dataset

 

<S> case schoolid

<S> yvar repeat

<S> constant cons

<S> lfit cons

 

    Iteration       Log. lik.       Difference

    __________________________________________

        1          -5948.5891

        2          -3625.9614        2323.

        3          -3554.2465        71.71

        4          -3553.4908       0.7557

        5          -3553.4906       0.1283E-03

        6          -3553.4906       0.1296E-09

 

<S> dis m

 

    X-vars            Y-var

    ______________________________

    cons              repeat

 

    Univariate model

    Standard logit

 

    Number of observations             =    8582

 

    X-var df           =     1

 

    Log likelihood =     -3553.4906     on    8581 residual degrees of freedom

 

<S> dis e

 

    Parameter              Estimate         Std. Err.

    ___________________________________________________

    cons                   -1.7738          0.30651E-01

 

<S> fit cons

 

    Initial Homogeneous Fit:

 

    Iteration       Log. lik.       Difference

    __________________________________________

        1          -5948.5891

        2          -3625.9614        2323.

        3          -3554.2465        71.71

        4          -3553.4908       0.7557

        5          -3553.4906       0.1283E-03

        6          -3553.4906       0.1296E-09

 

 

    Iteration       Log. lik.         Step      End-points     Orthogonality

                                     length    0          1      criterion

    ________________________________________________________________________

        1          -3237.7286        1.0000    fixed  fixed       334.98

        2          -3219.2799        1.0000    fixed  fixed       202.12

        3          -3217.3207        1.0000    fixed  fixed       167.22

        4          -3217.2649        1.0000    fixed  fixed       167.84

        5          -3217.2642        1.0000    fixed  fixed       216.57

        6          -3217.2642        1.0000    fixed  fixed       148.29

        7          -3217.2642        1.0000    fixed  fixed

 

<S> dis m

 

    X-vars            Y-var             Case-var

    ________________________________________________

    cons              repeat            schoolid

 

    Univariate model

    Standard logit

    Gaussian random effects

 

    Number of observations             =    8582

    Number of cases                    =     411

 

    X-var df           =     1

    Scale df           =     1

 

    Log likelihood =     -3217.2642     on    8580 residual degrees of freedom

 

<S> dis e

 

    Parameter              Estimate         Std. Err.

    ___________________________________________________

    cons                   -2.1263          0.79655E-01

    scale                   1.2984          0.84165E-01

 

<S> data schoolid sex pped repeat msesc

    --- new analysis begins

<S> read thaieduc2.dat

 

       7516 observations in dataset

 

<S> case schoolid

<S> yvar repeat

<S> constant cons

<S> lfit msesc sex pped cons

 

    Iteration       Log. lik.       Difference

    __________________________________________

        1          -5209.6942

        2          -3094.0634        2116.

        3          -3007.1924        86.87

        4          -3004.7357        2.457

        5          -3004.7313       0.4417E-02

        6          -3004.7313       0.1669E-07

 

<S> dis m

 

    X-vars            Y-var

    ______________________________

    cons              repeat

    msesc

    sex

    pped

 

    Univariate model

    Standard logit

 

    Number of observations             =    7516

 

    X-var df           =     4

 

    Log likelihood =     -3004.7313     on    7512 residual degrees of freedom

 

<S> dis e

 

    Parameter              Estimate         Std. Err.

    ___________________________________________________

    cons                   -1.7832          0.58777E-01

    msesc                 -0.24149          0.93750E-01

    sex                    0.42777          0.67637E-01

    pped                  -0.56885          0.70421E-01

 

<S> fit msesc sex pped cons

 

    Initial Homogeneous Fit:

 

    Iteration       Log. lik.       Difference

    __________________________________________

        1          -5209.6942

        2          -3094.0634        2116.

        3          -3007.1924        86.87

        4          -3004.7357        2.457

        5          -3004.7313       0.4417E-02

        6          -3004.7313       0.1669E-07

 

 

    Iteration       Log. lik.         Step      End-points     Orthogonality

                                     length    0          1      criterion

    ________________________________________________________________________

        1          -2741.1866        1.0000    fixed  fixed       193.41

        2          -2723.0976        1.0000    fixed  fixed       178.19

        3          -2720.8948        1.0000    fixed  fixed       89.392

        4          -2720.7670        1.0000    fixed  fixed       40.916

        5          -2720.7589        1.0000    fixed  fixed       33.123

        6          -2720.7582        1.0000    fixed  fixed       23.011

        7          -2720.7581        1.0000    fixed  fixed

 

<S> dis m

 

    X-vars            Y-var             Case-var

    ________________________________________________

    cons              repeat            schoolid

    msesc

    sex

    pped

 

    Univariate model

    Standard logit

    Gaussian random effects

 

    Number of observations             =    7516

    Number of cases                    =     356

 

    X-var df           =     4

    Scale df           =     1

 

    Log likelihood =     -2720.7581     on    7511 residual degrees of freedom

 

<S> dis e

 

    Parameter              Estimate         Std. Err.

    ___________________________________________________

    cons                   -2.2280          0.10461

    msesc                 -0.41370          0.22462

    sex                    0.53177          0.75805E-01

    pped                  -0.64022          0.98885E-01

    scale                   1.3026          0.72601E-01

 

<S> stop