/* Copyright (C) 1995 Evgenii Rudnyi, http://Evgenii.Rudnyi.Ru Software for paper E.B. Rudnyi. Statistical model of systematic errors: linear error model. Chemometrics and Intelligent Laboratory Systems. 1996, V. 34, N 1, p. 41-54. This software is a copyrighted work licensed under the terms, described in the file "FREE_LICENSE". */ #include "sumsqr.h" char* LICENSE = "\ Evgenii Rudnyi 1994, (c) All rights reserved \n\n\ Chemistry Department \n\ Moscow State University \n\ 119899 Moscow, Russia \n\ tel. (095)939-5452 \n\ rudnyi@mch.chem.msu.su \n\n\ This program is freeware (public domain). Feel free to use and \n\ distribute it, provided no charge is taken. \n\n\ I will be glad if you like this program. Let me know if you find any \n\ bugs. I would also appreciate your comments. \n\n\ If you need to change the model - try to contact me. \n\n\ Disclaimer of warranty: \n\ This program is supplied as is. I disclaim all warranties, \n\ express or implied, including, without limitation, the warranties of \n\ merchantability and of fitness of this program for any purpose. I assume \n\ no liability for damages direct or consequential, which may result from \n\ the use of this program.\n\n"; int nparam = 2; param par[2]; static double& a = par[0].x; static double& b = par[1].x; double line(double *reg) { double& y = reg[0]; double& x = reg[1]; return y - (a + b*x); } double justa(double *reg) { double& aexp = reg[0]; return aexp - a; } double justb(double *reg) { double& bexp = reg[0]; return bexp - b; } void init_res() { res.insert(residual("line", line, 2, 3l)); // a and b res.insert(residual("justa", justa, 1, 1l)); // only a res.insert(residual("justb", justb, 1, 2l)); // only b } char* EQ = "\ There are equations as follows \n\ \t\t\teq_ID equation \n\n\ \t\t\tjusta y = a + error\n\ \t\t\tjustb y = b + error\n\ \t\t\tline y = a + bx + error\n\n\ available in this release \n\ and two unknown parameters - a and b\n"; void init_par() { par[0].name = "a"; par[0].atr = true; par[1].name = "b"; par[1].atr = true; } void init_est() { } void post_analysis() { }