Displaying 1 result from an estimated 1 matches for "val_df".
Did you mean:
ai_df
2017 Aug 10
1
"Help On optim"
...ent the segment 1 if i=2 represent the 2 segment*
*parametersDf #which I have posted above*
*xnorm= function(x)*
*{ *
* #observation= append(segment1, segment2)*
* mu.vector = parametersDf[1:l] *
* var.vector =parametersDf[(l+1):((2*l))]*
* coeff.vector=parametersDf[(2*l+1):(3*l)]*
* val_df=data.frame()*
* sum_prob=0*
* for (j in 1:l){*
*
val=(coeff.vector[i,j]*(dnorm(x,mu.vector[i,j],sqrt(var.vector[i,j]))))*
* sum_prob=sum_prob+val*
* } *
* return(sum_prob)*
*}*
*#segment1*
*val1=optim(parametersDf$mean_mc_1[1],** fn=xnorm,*
* method = "BFGS")...