Hello @riyaaora275,
You can find the formulas for estimated mean and median survival time in section "Breslow, Fleming-Harrington, and Kaplan-Meier Methods" of the PROC LIFETEST documentation. Both formulas involve Kaplan-Meier estimates (because you used the default, KM, of option METHOD= of the PROC LIFETEST statement), so to replicate the results you would need to compute these first or take the values from table "Product-Limit Survival Estimates" in the PROC LIFETEST output (or the corresponding output dataset if you specify the OUTSURV= option).
Example: For brand=a in your sample data you have t 0 =0, t 1 =231, t 2 =390 and t 3 =398. The corresponding KM-estimates are 1, 1, 0.5 and 0, respectively. The estimated mean survival time is then computed as
1*(231-0)+1*(390-231)+0.5*(398-390)=394
If the Kaplan-Meier curve (i.e. the KM-estimates) does not drop below 0.75 (0.5, 0.25), the first quartile (median, third quartile) cannot be estimated (as is the case for brand=b in your sample data). This is possible only if the largest survival time is censored.
... View more