Intro

(*ReservedSymbols*)​​M::usage="Mesor";​​A::usage="Amplitude";​​tau::usage="Trial Period";​​phase::usage="phase";​​t::usage="timestamp, expressed in AbsoluteTime";​​Protect[{M,A,tau,phase,t}];​​​​​​(*multi-componentmodel*)​​cModel[n_Integer]/;n>=1:=M+Sum[A[i]*Cos[t*((2*Pi)/tau[i])+phase[i]],{i,n}];​​cModel[n_Integer,seeds:{__Rule}]/;n>=1:=cModel[n]/.seeds;​​(*exampleform*)​​cModel[2]
(*ReplaceAllexample*)cModelExec=Function[t,Evaluate[cModel[2]/.<|M->100,tau[1]->86400,A[1]->10,phase[1]->-Pi,tau[2]->89280,A[2]->3,phase[2]->-Pi/2|>]];​​N@cModelExec@10
Out[]=
90.0021

Flat Association

<|{tau,1}->86400,{tau,1,"CI"}->{29.1,32.3},...,{A,1,"CI"}->{1.1,1.2},...|>

Nested Association

<|tau->{<|1-><|"Value"->86400,"CI"->{29.1,32.3},...|>,2-><|...|>|>},A->{<|1-><|"CI"->{1.1,1.2},...|>,2-><|...|>|>}|>