ANOVA fourier code by Dr. Matt Templeton
Grant Foster has requested that we add an ANOVA routine to VStar so he can teach people how to use it at the upcoming Citizen Sky workshop. In a prior meeting, AAVSO staff agreed that it would be one of the more useful analysis tools to add to VStar. I don't think it should be a priority, but I wanted to open a tracker to use for whenever the team gets to it - whether it be before or after the workshop.
I'm also attaching fortran code that Matt Templeton wrote. He says this is much easier to read than the original TS sourcecode. So you may want to use this as your guide.
ANOVA fourier code by Dr. Matt Templeton
Fantastic. Thanks Aaron, Matt.
That code is definitely more readable than the TS code, and a lot shorter.
It also appears to use some post F77 features (F90?), which is cool. I may have some questions about the code yet, but it looks straightfoward.
Raising the priority of this tracker. I'd very much like to accommodate Grant's wish to use teach ANOVA in VStar at CS2
From an email on August 7 2010 in response to a question about this code vs Grant's anova1, Matt noticed an error from a del cep test I ran:
./aovmain
Input filename:
delcep.vis
4.65249112314219046E-002 404.14864137568554
Matt said:
"The frequency of 4.e-3 for delta Cep is obviously not correct and it set off my alarm bells. The problem is that freqmax in the subroutine aovmax is hard wired to a value that's far too low. I probably wrote this code to look at Miras or something.
If you set freqmax to 5.d-1 (or better yet, make it a user-defined variable), then you'll get the correct answer:
matthewt@mini% aovmain
Input filename:
delcep.tsv
0.186351424299361 1965.47454554160
matthewt@mini%
(The period of delta Cephei is about 5.3663 days == 0.18635 c/d)
David, when you get to that point, you might want to make freqmin and freqmax adjustable by the user, although freqmin should have a floor of 1/(Tspan). As long as freqmax != something insane it can be whatever they want."
Note also that this Fortran program (aovmain.f90) is a period analysis tool and is not the same as the anova/anova1 function in R that Grant refers to in his book.
aovmain.f90 corresponds to functionality outlined this VStar wiki page:
https://sourceforge.net/apps/mediawiki/vstar/index.php?title=ANOVA
whereas the R anova/nova1 are used to answer the question: what are the grounds for thinking that my binned mean curve represents a signal?
See also Grant's aovper R code available in Rcodes archive here:
Implemented anova (F-test, p-value) as per Grant's book's section 4.1 on signal. See http://vstar.svn.sourceforge.net/viewvc/vstar?view=revision&revision=552
Changes to ANOVA after feedback from Grant and Aaron: added between and within-group degrees of freedom to plot sub-title, for p-value < 0.000001, that is shown. Removed anova from phase plot subtitle until I have the chance to talk with Grant about whether this even makes sense.
In http://vstar.svn.sourceforge.net/viewvc/vstar?limit_changes=0&view=revision&revision=574
Would it also make sense to compute anova for phase plots as a measure of "goodness" of the plot?
The ANOVA output that now appears on the light curve plot needs to be documented in the Help docs.
This has been in place since CS2. See http://vstar.svn.sourceforge.net/viewvc/vstar?view=revision&revision=673
Functionality is complete. Closing this. The required help doc additions are broader than ANOVA.
Log in to post a comment.