Hi there, I've installed gammafit successfully and generated the alpha and beta coefficients on expenditure data for my set of n=241 variables. When I attempt to use the gamma fit for a subset of the data (n=70 variables) using the "if" function I encountered an error that states "could not calculate numerical derivatives, missing values encountered r(430)".
To clarify: My variable of interest is "Total_costs". Within the dataset I have 3 age ranges (represented as binary variables) and I would like to generate the gamma distribution for each of the age ranges individually. Applying "gammafit Total_costs" generates the alpha and beta coefficients ok for the whole sample.
Applying "gammafit Total_costs if Age0_1 == 1" gives the error. I've looked at the help and seems like the "if" is allowed with the gammafit so I think I might be specifying it incorrectly? Assistance much appreciated.
To clarify: My variable of interest is "Total_costs". Within the dataset I have 3 age ranges (represented as binary variables) and I would like to generate the gamma distribution for each of the age ranges individually. Applying "gammafit Total_costs" generates the alpha and beta coefficients ok for the whole sample.
Applying "gammafit Total_costs if Age0_1 == 1" gives the error. I've looked at the help and seems like the "if" is allowed with the gammafit so I think I might be specifying it incorrectly? Assistance much appreciated.
Comment