Continuing on my exploration of the log-normal distribution, I'm working on reimplementing some code originally written for a Weibull/Exponential model for a log-normal model. Among the things it does is use SAS's PROX NLMIXED to hard-calculate some likelihoods. While this is technically SAS code, I think it's pretty readable in a code-agnostic fashion.
For example, the Weibull Version:
*Linear Predictor of Event A
lam=exp(-(f0*alpha+f1*alpha*X));
*Density of Event A;
ff1=alpha*lam*t1**(alpha-1)*exp(-lam*t1**alpha);
ff2=alpha*lam*t2**(alpha-1)*exp(-lam*t2**alpha);
*Survival function of Event A;
sf1=exp(-lam*t1**alpha);
sf2=exp(-lam*t2**alpha);
The two survival functions are just at two different points in time for interval censoring.
I've implemented, I believe, the appropriate survival and density functions for a Log-Normal as follows:
*Density of EventA;
ff1 = exp(-0.5*((log(t1)-mu)/sigma)**2)/((t1*(2*CONSTANT('PI'))**0.5)*sigma);
ff2 = exp(-0.5*((log(t2)-mu)/sigma)**2)/((t2*(2*CONSTANT('PI'))**0.5)*sigma);
*Survival function of EventA;
sf1= 1 - CDF('Normal',((log(t1)-mu)/sigma));
sf2= 1 - CDF('Normal',((log(t2)-mu)/sigma));
I guess the first part of the question is does that appear correct? My second question is where I'm getting caught up, actually defining the linear predictor for the log normal. I think it should be something along the form of:
mu = exp(f0+f1*X) ala the Weibull above and with sigma estimated outside the linear predictor, but I'm not positive. Can someone point me in the right direction?
Edit: The goal PDF once the syntax errors are fixed is:

ff1andff2have misplaced parentheses (syntax error) andsf2should uset2, probably. Other than that, think of the lognormal just like it sounds: The log of the random variable is normal. So, if you wanted to do OLS, e.g., $\log Y$ would be your response variable. That should tell you how the predictors should enter in your scenario. :) – cardinal Aug 16 '12 at 10:29ff1 = exp(-0.5*((log(t1)-mu)/sigma)**2)/(t1*sigma*(2*CONSTANT('PI'))**0.5)? – cardinal Aug 16 '12 at 16:26R, but I was just trying to match parentheses in a natural way to get them to come in the order I expected. Note that right after the first**2, that close parentheses has no matching open one. Also, I'm guessing based on standard rules of evaluation that the*sigmaat the end will be in the numerator and not the denominator (where it should be). I realize my previous comments regarding this were likely too terse to be very useful. I'll await your further edits before commenting further. :-) – cardinal Aug 16 '12 at 16:34