2
$\begingroup$

I would like to deploy the following Manipulate function, which works in a Notebook:

g1=Manipulate[
 Module[{}, 
  Show[GraphicsColumn[{Plot[
      PDF[BetaDistribution[alpha, beta], theta], {theta, 
   0, 1}, Frame -> {True, True, False, False}, 
  FrameTicks -> {True, False}, FrameLabel -> {"theta", "pdf"}, 
  PlotLabel -> "prior", PlotStyle -> Blue, PlotRange -> Full], 
 Plot[Likelihood[
   BinomialDistribution[
    nSampleSize, theta], {nDiseased}], {theta, 0, 1}, 
  Frame -> {True, True, False, False}, 
  FrameTicks -> {True, False}, PlotRange -> Full, 
  FrameLabel -> {"theta", "likelihood"}, PlotStyle -> Blue, 
  PlotLabel -> "likelihood"], 
 Plot[PDF[
   BetaDistribution[alpha + nDiseased, beta + nSampleSize - 
     nDiseased], theta], {theta, 0, 1}, 
  Frame -> {True, True, False, False}, 
  FrameTicks -> {True, False}, PlotRange -> Full, 
  FrameLabel -> {"theta", "pdf"}, PlotStyle -> Blue, 
  PlotLabel -> "posterior"]}], ImageSize -> 400]], 
 Style["Prior parameters", Bold, Medium], {{alpha, 1, "Beta 1"}, 1,
   10, 1}, {{beta, 1, "Beta 2"}, 1, 10, 1}, Delimiter, 
 Style["Data", Bold, Medium], {{nSampleSize, 10, "Sample size"}, 10, 
  100, 1}, {{nDiseased, 1, "number with disease"}, 1, nSampleSize, 1},
  ControlPlacement -> Left]

I have tried:

CloudDeploy[g1, Permissions -> "Public"]

When I click the link that is generated, I am taken to a page with the object in it. However, the sliders don't seem to work properly. Specifically, only the middle graph seems to respond to changes in the sliders.

Does anyone have an idea how I can get this to work?

$\endgroup$
  • $\begingroup$ All the plots seemed to work fine for me, albeit slower than the local version, until I changed value of nDiseased from the default. Then the middle plot went flat. After a while the plots stopped updating at all. $\endgroup$ – xsk8rat Jun 18 '15 at 15:42
  • $\begingroup$ Thanks for trying. Am not sure that this aspect of Mathematica is quite up to scratch yet. Think I may try this sort of thing again in a few months. Best, Ben $\endgroup$ – ben18785 Jun 18 '15 at 15:43
1
$\begingroup$

All cloud products are in beta phase.

Many things are fixed very often but it will take a lot of time before one will be able to CloudDeploy without additional adjustements.

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.