From yxing at ucdavis.edu Thu Aug 29 10:34:36 2019 From: yxing at ucdavis.edu (Yan) Date: Wed, 28 Aug 2019 17:34:36 -0700 Subject: [Limdep Nlogit List] Questions about LCA for ordered probit model Message-ID: Hi! Can anyone help me with the following problem I met when doing LCA for an ordered probit model? "depen" is an ordered variable with the value range from 0 to 4. I ran same codes for many times. Most of time, I got outputs like shown in (1), but twice I got outputs like (2). Both the codes and data are exactly the same!! Why did this happen? Should a start value be given to compute function(Error 802)? How can I get results like (2) steadily? Many thanks! (1) |-> ordered ; Lhs=depen ; Rhs=one, AGE,RACEWHIT, STUDENTS, MALE ; LCM=TRAVELWA, TRAVELCO, ENVENERG, LIKEDRIV, LIKERIDE, LIKETRAN, LIKEBIKE, LIKEWALK, WORRYOUT, LIKESHUT ; Pts=2$ --------------------------------------------------------------- Deleted 14 observations with missing data. N is now 162 --------------------------------------------------------------- Warning 43: ORDERED PROBIT - Current estimated thresholds not ordered. Error 802: Cannot compute function at start values. Exit status=4. Function value was .1951595121D+03 at entry ----------- .1581983858D+03 at exit ----------- (2) |-> ordered ; Lhs=depen ; Rhs=one, AGE,RACEWHIT, STUDENTS, MALE ; LCM=TRAVELWA, TRAVELCO, ENVENERG, LIKEDRIV, LIKERIDE, LIKETRAN, LIKEBIKE, LIKEWALK, WORRYOUT, LIKESHUT ; Pts=2$ --------------------------------------------------------------- Deleted 14 observations with missing data. N is now 162 --------------------------------------------------------------- Warning 43: ORDERED PROBIT - Current estimated thresholds not ordered. Warning 43: ORDERED PROBIT - Current estimated thresholds not ordered. Warning 43: ORDERED PROBIT - Current estimated thresholds not ordered. Warning 43: ORDERED PROBIT - Current estimated thresholds not ordered. Line search at iteration 33 does not improve the function Exiting optimization ----------------------------------------------------------------------------- Latent Class / Panel OrdProbs Model Dependent variable DEPEN Log likelihood function -158.19839 Estimation based on N = 176, K = 27 Inf.Cr.AIC = 370.4 AIC/N = 2.105 Sample is 1 pds and 176 individuals Latent class model with 2 latent classes Missing data: Skipped 14 individuals. Ordered probability model Ordered probit (normal) model LHS variable = values 0,1,..., 4 --------+-------------------------------------------------------------------- | Standard Prob. 95% Confidence DEPEN| Coefficient Error z |z|>Z* Interval --------+-------------------------------------------------------------------- |Model parameters for latent class 1................................. Constant| 5.29996 .3857D+07 .00 1.0000 *********** *********** AGE| .08170 .12721 .64 .5208 -.16764 .33103 RACEWHIT| -.23151 .86430 -.27 .7888 -1.92550 1.46248 STUDENTS| -4.86029 .3857D+07 .00 1.0000 *********** *********** MALE| -2.08153 3.67508 -.57 .5711 -9.28456 5.12150 Mu(01)| -5.84096 .1474D+08 .00 1.0000 *********** *********** Mu(02)| -2.54470 14.21718 -.18 .8579 -30.40986 25.32045 Mu(03)| -.61230 .81213 -.75 .4509 -2.20406 .97945 |Model parameters for latent class 2................................. Constant| 4.85715*** 1.19866 4.05 .0001 2.50781 7.20649 AGE| -.05742** .02492 -2.30 .0212 -.10626 -.00858 RACEWHIT| -.72129** .31729 -2.27 .0230 -1.34317 -.09941 ................................ From yxing at ucdavis.edu Thu Aug 29 10:47:12 2019 From: yxing at ucdavis.edu (Yan) Date: Wed, 28 Aug 2019 17:47:12 -0700 Subject: [Limdep Nlogit List] How to deal with choice-based sample for LCA for logit models Message-ID: Hi anyone! I have a choice-based sample and want to do a LCA for binary logit model. May someone know how to deal with it? To weight sample before doing the model may result in inefficient estimate the parameters, so what methods are appropriate for it? From wgreene at stern.nyu.edu Thu Aug 29 10:47:31 2019 From: wgreene at stern.nyu.edu (William Greene) Date: Wed, 28 Aug 2019 20:47:31 -0400 Subject: [Limdep Nlogit List] Questions about LCA for ordered probit model In-Reply-To: References: Message-ID: You need to run the base model before each time you run the LC model. The latent class model should consist of these two commands ordered ; Lhs=depen ; Rhs=one, AGE,RACEWHIT, STUDENTS, MALE $ ordered ; Lhs=depen ; Rhs=one, AGE,RACEWHIT, STUDENTS, MALE ; LCM=TRAVELWA, TRAVELCO, ENVENERG, LIKEDRIV, LIKERIDE, LIKETRAN, LIKEBIKE, LIKEWALK, WORRYOUT, LIKESHUT ; Pts=2$ ----------------------------------------------------------------------------------------------------------------- On Wed, Aug 28, 2019 at 8:35 PM Yan via Limdep wrote: > Hi! Can anyone help me with the following problem I met when doing LCA for > an ordered probit model? > > "depen" is an ordered variable with the value range from 0 to 4. > > I ran same codes for many times. Most of time, I got outputs like shown in > (1), but twice I got outputs like (2). Both the codes and data are exactly > the same!! Why did this happen? Should a start value be given to compute > function(Error 802)? How can I get results like (2) steadily? Many thanks! > > (1) |-> ordered ; Lhs=depen > > ; Rhs=one, AGE,RACEWHIT, STUDENTS, MALE > > ; LCM=TRAVELWA, TRAVELCO, ENVENERG, LIKEDRIV, > > LIKERIDE, LIKETRAN, LIKEBIKE, LIKEWALK, WORRYOUT, LIKESHUT > > ; Pts=2$ > > > > --------------------------------------------------------------- > > Deleted 14 observations with missing data. N is now 162 > > --------------------------------------------------------------- > > Warning 43: ORDERED PROBIT - Current estimated thresholds not ordered. > > Error 802: Cannot compute function at start values. Exit status=4. > > Function value was .1951595121D+03 at entry ----------- > > .1581983858D+03 at exit ----------- > > (2) > > |-> ordered ; Lhs=depen > > ; Rhs=one, AGE,RACEWHIT, STUDENTS, MALE > > ; LCM=TRAVELWA, TRAVELCO, ENVENERG, LIKEDRIV, > > LIKERIDE, LIKETRAN, LIKEBIKE, LIKEWALK, WORRYOUT, LIKESHUT > > ; Pts=2$ > > > > --------------------------------------------------------------- > > Deleted 14 observations with missing data. N is now 162 > > --------------------------------------------------------------- > > Warning 43: ORDERED PROBIT - Current estimated thresholds not ordered. > > Warning 43: ORDERED PROBIT - Current estimated thresholds not ordered. > > Warning 43: ORDERED PROBIT - Current estimated thresholds not ordered. > > Warning 43: ORDERED PROBIT - Current estimated thresholds not ordered. > > Line search at iteration 33 does not improve the function > > Exiting optimization > > > > > ----------------------------------------------------------------------------- > > Latent Class / Panel OrdProbs Model > > Dependent variable DEPEN > > Log likelihood function -158.19839 > > Estimation based on N = 176, K = 27 > > Inf.Cr.AIC = 370.4 AIC/N = 2.105 > > Sample is 1 pds and 176 individuals > > Latent class model with 2 latent classes > > Missing data: Skipped 14 individuals. > > Ordered probability model > > Ordered probit (normal) model > > LHS variable = values 0,1,..., 4 > > > --------+-------------------------------------------------------------------- > > | Standard Prob. 95% Confidence > > DEPEN| Coefficient Error z |z|>Z* Interval > > > --------+-------------------------------------------------------------------- > > |Model parameters for latent class > 1................................. > > Constant| 5.29996 .3857D+07 .00 1.0000 *********** > *********** > > AGE| .08170 .12721 .64 .5208 -.16764 .33103 > > RACEWHIT| -.23151 .86430 -.27 .7888 -1.92550 1.46248 > > STUDENTS| -4.86029 .3857D+07 .00 1.0000 *********** > *********** > > MALE| -2.08153 3.67508 -.57 .5711 -9.28456 5.12150 > > Mu(01)| -5.84096 .1474D+08 .00 1.0000 *********** > *********** > > Mu(02)| -2.54470 14.21718 -.18 .8579 -30.40986 25.32045 > > Mu(03)| -.61230 .81213 -.75 .4509 -2.20406 .97945 > > |Model parameters for latent class > 2................................. > > Constant| 4.85715*** 1.19866 4.05 .0001 2.50781 7.20649 > > AGE| -.05742** .02492 -2.30 .0212 -.10626 -.00858 > > RACEWHIT| -.72129** .31729 -2.27 .0230 -1.34317 -.09941 > ................................ > _______________________________________________ > Limdep site list > Limdep at mailman.sydney.edu.au > http://limdep.itls.usyd.edu.au > > From yxing at ucdavis.edu Thu Aug 29 10:51:53 2019 From: yxing at ucdavis.edu (Yan) Date: Wed, 28 Aug 2019 17:51:53 -0700 Subject: [Limdep Nlogit List] Questions about LCA for ordered probit model In-Reply-To: References: Message-ID: Great! It works! Thanks so much Professor Greene! On Wed, Aug 28, 2019 at 5:48 PM William Greene via Limdep < limdep at mailman.sydney.edu.au> wrote: > You need to run the base model before each time you run the LC model. > The latent class model should consist of these two commands > > ordered ; Lhs=depen ; Rhs=one, AGE,RACEWHIT, STUDENTS, MALE $ > ordered ; Lhs=depen ; Rhs=one, AGE,RACEWHIT, STUDENTS, MALE > ; LCM=TRAVELWA, TRAVELCO, ENVENERG, LIKEDRIV, > LIKERIDE, LIKETRAN, LIKEBIKE, LIKEWALK, WORRYOUT, LIKESHUT > ; Pts=2$ > > ----------------------------------------------------------------------------------------------------------------- > > On Wed, Aug 28, 2019 at 8:35 PM Yan via Limdep < > limdep at mailman.sydney.edu.au> > wrote: > > > Hi! Can anyone help me with the following problem I met when doing LCA > for > > an ordered probit model? > > > > "depen" is an ordered variable with the value range from 0 to 4. > > > > I ran same codes for many times. Most of time, I got outputs like shown > in > > (1), but twice I got outputs like (2). Both the codes and data are > exactly > > the same!! Why did this happen? Should a start value be given to compute > > function(Error 802)? How can I get results like (2) steadily? Many > thanks! > > > > (1) |-> ordered ; Lhs=depen > > > > ; Rhs=one, AGE,RACEWHIT, STUDENTS, MALE > > > > ; LCM=TRAVELWA, TRAVELCO, ENVENERG, LIKEDRIV, > > > > LIKERIDE, LIKETRAN, LIKEBIKE, LIKEWALK, WORRYOUT, LIKESHUT > > > > ; Pts=2$ > > > > > > > > --------------------------------------------------------------- > > > > Deleted 14 observations with missing data. N is now 162 > > > > --------------------------------------------------------------- > > > > Warning 43: ORDERED PROBIT - Current estimated thresholds not ordered. > > > > Error 802: Cannot compute function at start values. Exit status=4. > > > > Function value was .1951595121D+03 at entry ----------- > > > > .1581983858D+03 at exit ----------- > > > > (2) > > > > |-> ordered ; Lhs=depen > > > > ; Rhs=one, AGE,RACEWHIT, STUDENTS, MALE > > > > ; LCM=TRAVELWA, TRAVELCO, ENVENERG, LIKEDRIV, > > > > LIKERIDE, LIKETRAN, LIKEBIKE, LIKEWALK, WORRYOUT, LIKESHUT > > > > ; Pts=2$ > > > > > > > > --------------------------------------------------------------- > > > > Deleted 14 observations with missing data. N is now 162 > > > > --------------------------------------------------------------- > > > > Warning 43: ORDERED PROBIT - Current estimated thresholds not ordered. > > > > Warning 43: ORDERED PROBIT - Current estimated thresholds not ordered. > > > > Warning 43: ORDERED PROBIT - Current estimated thresholds not ordered. > > > > Warning 43: ORDERED PROBIT - Current estimated thresholds not ordered. > > > > Line search at iteration 33 does not improve the function > > > > Exiting optimization > > > > > > > > > > > ----------------------------------------------------------------------------- > > > > Latent Class / Panel OrdProbs Model > > > > Dependent variable DEPEN > > > > Log likelihood function -158.19839 > > > > Estimation based on N = 176, K = 27 > > > > Inf.Cr.AIC = 370.4 AIC/N = 2.105 > > > > Sample is 1 pds and 176 individuals > > > > Latent class model with 2 latent classes > > > > Missing data: Skipped 14 individuals. > > > > Ordered probability model > > > > Ordered probit (normal) model > > > > LHS variable = values 0,1,..., 4 > > > > > > > --------+-------------------------------------------------------------------- > > > > | Standard Prob. 95% Confidence > > > > DEPEN| Coefficient Error z |z|>Z* Interval > > > > > > > --------+-------------------------------------------------------------------- > > > > |Model parameters for latent class > > 1................................. > > > > Constant| 5.29996 .3857D+07 .00 1.0000 *********** > > *********** > > > > AGE| .08170 .12721 .64 .5208 -.16764 .33103 > > > > RACEWHIT| -.23151 .86430 -.27 .7888 -1.92550 1.46248 > > > > STUDENTS| -4.86029 .3857D+07 .00 1.0000 *********** > > *********** > > > > MALE| -2.08153 3.67508 -.57 .5711 -9.28456 5.12150 > > > > Mu(01)| -5.84096 .1474D+08 .00 1.0000 *********** > > *********** > > > > Mu(02)| -2.54470 14.21718 -.18 .8579 -30.40986 25.32045 > > > > Mu(03)| -.61230 .81213 -.75 .4509 -2.20406 .97945 > > > > |Model parameters for latent class > > 2................................. > > > > Constant| 4.85715*** 1.19866 4.05 .0001 2.50781 7.20649 > > > > AGE| -.05742** .02492 -2.30 .0212 -.10626 -.00858 > > > > RACEWHIT| -.72129** .31729 -2.27 .0230 -1.34317 -.09941 > > ................................ > > _______________________________________________ > > Limdep site list > > Limdep at mailman.sydney.edu.au > > http://limdep.itls.usyd.edu.au > > > > > _______________________________________________ > Limdep site list > Limdep at mailman.sydney.edu.au > http://limdep.itls.usyd.edu.au > >