<!DOCTYPE rkplugin>
<document>
	<code file="plot_negbinomial_clt.php" />
	<help file="plot_negbinomial_clt.rkh" />
	<snippets>
		<snippet id="dist_options">
			<frame id="frame_negbinomparam" label="Negative Binomial Parameters">
				<spinbox type="integer" id="size_trial" min="1" initial="12" label="Target number of successful trials" />
				<spinbox default_precision="1" type="real" id="size_disp" min="0.01" initial="12.00" label="Dispersion"/>
				<row>
					<column>
						<spinbox default_precision="2" type="real" id="prob" initial="0.75" min="0" max="1" label="Success probability" />
						<spinbox default_precision="1" type="real" id="mu" initial="4" min="0.01" label="Mean (mu)" />
					</column>
					<column>
						<radio id="param" label="Type of Parameterization" >
							<option value="pprob" label="Success probability" />
							<option value="pmu" label="Mean (mu)" />
						</radio>
					</column>
				</row>
			</frame>
		</snippet>
		<include file="plot_clt_snippets.xml"/>
	</snippets>
	<logic>
		<insert snippet="clt_logic"/>
		<set id="dist_stepfun.default_verticals" to="false" />
		<set id="plotoptions.default_main" to="Negative Binomial"/>

		<convert id="useprob" mode="equals" sources="param.string" standard="pprob" />
		<connect client="prob.enabled" governor="useprob" />
		<connect client="size_trial.visible" governor="useprob" />
		<convert id="usemu" mode="equals" sources="param.string" standard="pmu" />
		<connect client="mu.enabled" governor="usemu" />
		<connect client="size_disp.visible" governor="usemu" />
	</logic>
	<dialog label="Central Limit Theorem: Negative Binomial to Normal" >
		<insert snippet="clt_layout"/>
	</dialog>
</document>
