Re: [R] optim() for ordered logit model with parallel regression assumption

2012-08-03 Thread R. Michael Weylandt
On Wed, Aug 1, 2012 at 4:34 PM, Xu Jun wrote: > Thanks Michael. Now I switched my approach after doing some google. > Following are my new codes: > > ### > library(foreign) > readin <- read.dta("ordfile.dta", convert.factors=FALSE) > myvars <- c("

Re: [R] optim() for ordered logit model with parallel regression assumption

2012-08-01 Thread Xu Jun
I am not that proficient in R. I found some codes on web using those indicator variables to sum up log likelihood. I block out bols in the codes, but I also tried using them as start value for my estimation of ologit. Didn't work. Thanks for your suggestion. Jun On Wed, Aug 1, 2012 at 5:44 PM, Be

Re: [R] optim() for ordered logit model with parallel regression assumption

2012-08-01 Thread Bert Gunter
Disclaimer: I have not followed this thread at all, but only wish to note: 1) Indicator variables are (almost?) never needed in R -- that you are fooling with them suggests that there is probably a better approach. 2) Your bols is just least regression, no? -- If so, there are far better ways to

Re: [R] optim() for ordered logit model with parallel regression assumption

2012-08-01 Thread Xu Jun
Thanks Michael. Now I switched my approach after doing some google. Following are my new codes: ### library(foreign) readin <- read.dta("ordfile.dta", convert.factors=FALSE) myvars <- c("depvar", "x1", "x2", "x3") mydta <- readin[myvars] # remov

Re: [R] optim() for ordered logit model with parallel regression assumption

2012-07-31 Thread R. Michael Weylandt
On Tue, Jul 31, 2012 at 7:57 PM, Xu Jun wrote: > Dear R listers, > > I am learning the MLE utility optim() in R to program ordered logit > models just as an exercise. See below I have three independent > variables, x1, x2, and x3. Y is coded as ordinal from 1 to 4. Y is not > yet a factor variable

[R] optim() for ordered logit model with parallel regression assumption

2012-07-31 Thread Xu Jun
Dear R listers, I am learning the MLE utility optim() in R to program ordered logit models just as an exercise. See below I have three independent variables, x1, x2, and x3. Y is coded as ordinal from 1 to 4. Y is not yet a factor variable here. The ordered logit model satisfies the parallel regre