[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: Weibull MLE, part II
Hello All ---
Please pardon the repeated queries about Weibull maximum
likelihood estimation, but...
About 10 days ago Nick Cox kindly indicated that I was not
supplying a variable for an argument within my program -- fair
enough -- and now I am at a loss as to the proper
implementation of the Weibull MLE program supplied by Gould,
Pitblado, & Scribney when I have a single vector of data
(survival time). The program I'm using is pasted below:
args lnf leta lgam
tempvar p M R
gen double `p' = exp(`lgam')
gen double `M' = ($ML_y1*exp(-`leta'))^`p'
gen double `R' = ln($ML_y1)-`leta'
replace `lnf' = -`M'+$ML_y2*(`lgam'-`leta'+(`p'-1)*`R')
This program executes without problem when used on the 'cancer'
dataset (with some modification to the variable 'drug' of
course) that is accessible from within Stata but terminates in
error on my dataset with 'invalid syntax'. My question is
this: what am I overlooking from a programming perspective?
My objective is estimation of theta & beta and -nlcom- will
accomplish this, however, I wish to take the scenic route on
this one thus my desire to do this with Stata's -ml- commands.
I am much obliged!
* For searches and help try: