# Fitting Lognormal Distribution in WinBugs

Let's suppose that some data points follow $Lognormal(\mu,\sigma^2)$ and both parameters are unknown . My goal is to obtain the posterior distribution by assigning conjugate prior distributions on both $\mu$ and $\sigma^2$,. How this can be done in WinBugs?

-

2
Why not just transform your data so that it is normal, i.e. take the log of your data? – guy Jan 15 at 0:44

2
1) If the priors really are conjugate, there's no need to use WinBUGS, as the posterior will have a nice closed form. 2) If you take the log of your data, it will be Normally distributed, and you can use the conjugate priors for the Normal. – jbowman Jan 15 at 0:44
@guy, jbowman. Yes, this can be solved by transforming the data to normal, but i really need to learn this without transformation (i.e., what is the conjugate prior for lognormal's parameters?) – act00 Jan 15 at 1:13

1
@act00 the conjugate prior for the lognormal distribution is the normal distribution (or normal-inverse-gamma if you want to put a prior on $(\mu, \sigma^2)$). Why? Because you can transform the data so that it is normal, and then use the conjugate prior for the normal. However, if you want to use the lognormal directly it is given by dlnorm(mu, tau) where tau is $1 / \sigma^2$ in the usual parameterization; just stick a normal-gamma prior on those two. – guy Jan 15 at 2:57
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 5, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.8652651906013489, "perplexity_flag": "head"}