diff options
| author | Johannes Ranke <jranke@uni-bremen.de> | 2017-10-18 11:18:07 +0200 | 
|---|---|---|
| committer | Johannes Ranke <jranke@uni-bremen.de> | 2017-10-18 11:18:07 +0200 | 
| commit | 3d6b4b4b8293a4a4ab6f06805e1380600373796c (patch) | |
| tree | 4ec4dd041427b0154684122f5ae2101c7385f5e2 /CakeCost.R | |
| parent | be6d42ef636e8e1c9fdcfa6f8738ee10e885d75b (diff) | |
Version 2.0v2.0
Diffstat (limited to 'CakeCost.R')
| -rw-r--r-- | CakeCost.R | 38 | 
1 files changed, 30 insertions, 8 deletions
@@ -23,7 +23,7 @@  # You should have received a copy of the GNU General Public License along with  # this program. If not, see <http://www.gnu.org/licenses/>#   # -# $Id: CakeCost.R 216 2011-07-05 14:35:03Z nelr $ +# $Id$  CakeCost <- function (model, obs, x = "time", y = NULL, err = NULL,                       weight = "none", scaleVar = FALSE, cost = NULL, ...) { @@ -180,6 +180,24 @@ CakeCost <- function (model, obs, x = "time", y = NULL, err = NULL,      Res <- (ModVar- obsdat)      res <- Res/Err      resScaled <- res*Scale + +    # print("==========================="); +    # print("#Names[i]"); +    # print(Names[i]); +    # print("xDat"); +    # print(xDat); +    # print("obsdat"); +    # print(obsdat); +    # print("ModVar"); +    # print(ModVar); +    # print("1/Err"); +    # print(1/Err); +    # print("Res"); +    # print(Res); +    # print("res"); +    # print(res); +    # print("==========================="); +          Residual <- rbind(Residual,                        data.frame(                          name   = Names[i], @@ -191,13 +209,17 @@ CakeCost <- function (model, obs, x = "time", y = NULL, err = NULL,                          res    = res))      CostVar <- rbind(CostVar, -                     data.frame( -                       name           = Names[i], -                       scale          = Scale, -                       N              = length(Res), -                       SSR.unweighted = sum(Res^2), -                       SSR.unscaled   = sum(res^2), -                       SSR            = sum(resScaled^2))) +                  data.frame( +                    name           = Names[i], +                    scale          = Scale, +                    N              = length(Res), +                    SSR.unweighted = sum(Res^2), +                    SSR.unscaled   = sum(res^2), +                    SSR            = sum(resScaled^2))) +                     +    # print("************************") +    # print(CostVar) +    # print("************************")    }  # end loop over all observed variables    ## SSR  | 
