Hi David, 

Thanks for the catch. I just committed a fix for this problem in the development version of Amelia. Should be fixed in the next release. If you need it earlier, you can see how to install the developer version here: https://github.com/IQSS/Amelia

Cheers,
Matt

~~~~~~~~~~~
Matthew Blackwell
Assistant Professor of Government
Harvard University
url: http://www.mattblackwell.org

On Tue, Apr 14, 2015 at 10:06 AM David K. <code@rotinaj.org> wrote:
Dear Members,

I am very sorry, but the previous patch I supplied was buggy itself! Please find the fixed patch attached.

Kind regards,
David



> On Apr 14, 2015, at 15:59, David K. <code@rotinaj.org> wrote:
>
> Dear List Members,
>
> I experience an error when running tscsPlot on an Amelia output with the message:
>
> Error in output$theta[, , ceiling(i/drawsperimp)] :
>  subscript out of bounds
>
> The error is due to the ceiling function, which for some settings returns wrong results due to floating point arithmetic. In my case m = 6 and draws = 100 resulting in
> ceiling(100 / ( (1/6) * 100)) = 7 != 6
> so index is out of bounds.
>
> I attached a patch which only uses integer arithmetic and is thus not susceptible to floating point arithmetic errors.
> Hope that helps!
>
> Kind regards,
> David
>
> <Amelia_tscsPlot_fpbug.patch>--
> Amelia mailing list served by HUIT
> [Un]Subscribe/View Archive: http://lists.gking.harvard.edu/?info=amelia
> More info about Amelia: http://gking.harvard.edu/amelia
> Amelia mailing list
> Amelia@lists.gking.harvard.edu
>
> To unsubscribe from this list or get other information:
>
> https://lists.gking.harvard.edu/mailman/listinfo/amelia

--
Amelia mailing list served by HUIT
[Un]Subscribe/View Archive: http://lists.gking.harvard.edu/?info=amelia
More info about Amelia: http://gking.harvard.edu/amelia
Amelia mailing list
Amelia@lists.gking.harvard.edu

To unsubscribe from this list or get other information:

https://lists.gking.harvard.edu/mailman/listinfo/amelia