An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-dynamic-models/attachments/20130926/edccacca/attachment.pl>
[R-sig-dyn-mod] ConstrOptim Function Error stating ui%*%theta:matrix/vector complex arguments...
3 messages · Munjal Patel, Daniel Reed
Hi Munjal: Could you post all of the code (i.e., including definitions of all functions and data structures)? Cheers, Daniel _______________________________ Daniel C. Reed, PhD. Postdoctoral Fellow, Dept. of Earth & Environmental Sciences, University of Michigan, Ann Arbor, MI, USA. email: reeddc at umich.edu web: www.danielreed.org
On Sep 26, 2013, at 4:50 PM, Munjal Patel <munjalpatel85 at gmail.com> wrote:
Hello All,
I am stuck in the following problem.
Cexpt=c(0,25,50,100,150,300,250,125,40)
t=c(0,0.2,0.4,0.6,1,4,8,12,24)
theta0= vector of 6 parms (My initial parameter)
A=Constraint matrix (hopefully 6*6)
B= Constraint vector of length 6)
Cfit=function(t,theta){
J(t)=function(theta,t)
Cfit=function(J(t),constant)
return(Cfit) }
loss=function(theta,t,Cexpt) { sum(Cexpt- Cfit(t,theta))^2}
Final=constrOptim(theta0,loss,t,Cexpt,NULL,A,B)
When i try to fit it gives me error
ERROR IN UI%*% THETA : MATRIX/VECTOR/COMPLEX ARGUEMENTS REQUIRED OR
SOMETHING...
thank you all.
M
J
--
Munjal Patel
PhD Student
Division of Pharmaceutical Sciences
Long Island University
Brooklyn,NY
Cell: 201 707 3301
[[alternative HTML version deleted]]
_______________________________________________ R-sig-dynamic-models mailing list R-sig-dynamic-models at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-dynamic-models
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-dynamic-models/attachments/20130926/8b3cdb00/attachment.pl>