Hello Karline and Thomas:

Thanks for your reply, which I'm adding to my collection of "mailing-list wisdom".  I did, in fact, manage to take into account all non-NA observations regarding the iwo-jima model in the end, not only the american ones, like I had to do before.  In fact, what I did was to use a weights data frame in which all the corresponding NA observations on the japanese column were set to zero:

pesos <- data.frame(ame=rep(1, nrow(obs)), jap = rep(0, nrow=(obs)))
pesos[1,"jap"] <- 1
pesos[nrow(obs),"jap"] <- 1

Where "pesos" is not the mexican currency, but the data frame of weights.  With this, and with your suggestions to steer clear of rk4 (i used lsoda), i managed to fit the iwo jima models with fitOdeModel and modFit (FME), obtaining the following results (of the efficiency rates):

japanese        american
Engel (1954)           0.0577            0.0106
with fitOdeModel     0.05521517    0.01068373
with FME                0.0561            0.0100

I then decided to compare the results using the ssqOdeModel for the three sets of parameters and also with my own metric (which is simply the square root of the sum of squares of absolute errors, without weighing by standard deviations of variables), obtaining the following:

ssqOdeModel       square root of sum of squares
Engel (1954)           0.3167629             6301.472
with fitOdeModel    0.05446168            2462.837
with FME                0.04753312            3066.159

The FME parameters give a lower ssqOdeModel, although the sum of squares is higher than that of fitOdeModels. Both were based on all non-NA observations. What are the advantages of using FME over fitOdeModel in cases like this?

Thanks and Regards, 

jose romero







	[[alternative HTML version deleted]]

