Felix, I see your point about the "halfway" point acting like the first day of the month in its relativity to the ending date of the month: they're both variable.
I'm an actuary. Like accountants, actuaries tend to measure "financial" time in months because of how the books close. But in our mathematical models time takes on a continuous nature. So our problem is how to build a computer representation of time that reflects both its continuous nature as well as the varying-length, "discrete" nature of financial months. I've found that a fixed value for a halfway point complicates actuarial calculations. It could serve other purposes just fine, however. Best regards, Dan On Wed, May 19, 2010 at 7:48 PM, Felix Andrews <fe...@nfrac.org> wrote: > On 20 May 2010 11:56, Daniel Murphy <chiefmur...@gmail.com> wrote: > >>Much better to implement directly what this is trying to do: i.e. to > >>have a "halfmonth" time step. This is just the union of two "monthly" > >>sequences, one on the 1st of each month and another on the 15th of > >>each month. > > > > For some applications that might be true. But not for others. For a month > > with 31 days, there are 14 days before the 15th of the month and 16 days > > after the 15th, so, for example, March 16th (specifically noon) rather > than > > March 15th would be the halfway point if you define "halfway" in terms of > > the distances to the beginning and end of the month. For a month with 30 > > days -- like April -- the halfway point would be the instant between the > > 15th and the 16th of the month. Do you label that instant April 15 or > April > > 16? (I prefer "15".) Don't get me started on February. > > Dan, you are correct: the midpoint of a 30 day month is the 16th at > 00:00. That instant is called the 16th according to print.POSIXt. > > junstart <- as.POSIXct("2000-06-01 00:00", tz="GMT") > julstart <- as.POSIXct("2000-07-01 00:00", tz="GMT") > junstart + ((julstart - junstart) / 2) > #[1] "2000-06-16 GMT" > > How embarassing... > So I think it would be better to use 16 rather than 15 for the > "halfmonth" time step. > > Yes, months have variable lengths, but I think it is best to use a > consistent date (the 16th) than to calculate exact midpoints, just as > a normal monthly series has a consistent date (the 1st) and has > variable lengths. > > Regards > -Felix > > > > > > - Dan Murphy > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-devel@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/r-devel > > > > > > -- > Felix Andrews / å®ç¦ç« > Postdoctoral Fellow > Integrated Catchment Assessment and Management (iCAM) Centre > Fenner School of Environment and Society [Bldg 48a] > The Australian National University > Canberra ACT 0200 Australia > M: +61 410 400 963 > T: + 61 2 6125 4670 > E: felix.andr...@anu.edu.au > CRICOS Provider No. 00120C > -- > http://www.neurofractal.org/felix/ > [[alternative HTML version deleted]]
______________________________________________ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel