Difference between revisions of "MyTest"

From Popix
Jump to navigation Jump to search
m
m
Line 3: Line 3:
  
  
{| align=left; cellpadding="2" style="width: 600px; background-color:#ffffcc; font-family:'courier new';font-size:12pt;"
+
{| align=left; cellpadding="2" style="width: 800px; background-color:#ffffcc; font-family:'courier new';font-size:12pt;"
 
| colspan = "2" style="align:center;" |  fmin1=function(x,y,t) <br> {f=predc1(t,x) <br> g=x[4] <br> e=sum( ((y-f)/g)^2+log(g^2)) <br> }
 
| colspan = "2" style="align:center;" |  fmin1=function(x,y,t) <br> {f=predc1(t,x) <br> g=x[4] <br> e=sum( ((y-f)/g)^2+log(g^2)) <br> }
 
|-
 
|-
Line 16: Line 16:
 
|<br>
 
|<br>
 
|-  
 
|-  
| style="width: 300px; text-align:left;  | pk.nlm1=nlm(fmin1, c(0.3,6,0.2,1), y, t, hessian="true") <br> <code><div style="background-color:#ffffcc; font-family:'courier new';font-size:12pt;">psi1=pk.nlm1$estimate</div></code> <br> pk.nlm2=nlm(fmin2, c(3,10,0.2,4), y, t, hessian="true") <br> <code><div style="background-color:#ffffcc; font-family:'courier new';font-size:12pt;">psi2=pk.nlm2$estimate</div></code> ||  
+
| style="width: 400px; text-align:left;  | pk.nlm1=nlm(fmin1, c(0.3,6,0.2,1), y, t, hessian="true") <br> <code><div style="background-color:#ffffcc; font-family:'courier new';font-size:12pt;">psi1=pk.nlm1$estimate</div></code> <br> pk.nlm2=nlm(fmin2, c(3,10,0.2,4),y,t,hessian="true") <br> <code><div style="background-color:#ffffcc; font-family:'courier new';font-size:12pt;">psi2=pk.nlm2$estimate</div></code> ||  
| style="width: 300px; text-align:left; background-color:white; color:red;"  | > cat(" psi1 =",psi1,"\n\n") <br> |style="text-align:left;background-color:white; color:red;" psi1 = 0.3240916 6.001204 0.3239337 0.4366948 <br><br> | style="text-align:left; background-color:white; color:red;" | > cat(" psi2 =",psi2,"\n\n") <br> |  style="text-align:left; width: 400px; background-color:white; color:blue; | psi2 = 3.203111 8.999746 0.229977 0.2555242
+
| style="width: 400px; text-align:left; background-color:white; color:red;"  | > cat(" psi1 =",psi1,"\n\n") <br> |style="text-align:left;background-color:white; color:red;" psi1 = 0.3240916 6.001204 0.3239337 0.4366948 <br><br> | style="text-align:left; background-color:white; color:red;" | > cat(" psi2 =",psi2,"\n\n") <br> |  style="text-align:left; width: 400px; background-color:white; color:blue; | psi2 = 3.203111 8.999746 0.229977 0.2555242
 
|}
 
|}
  

Revision as of 16:49, 4 February 2013



fmin1=function(x,y,t)
{f=predc1(t,x)
g=x[4]
e=sum( ((y-f)/g)^2+log(g^2))
}

fmin2=function(x,y,t)
{f=predc2(t,x)
g=x[4]
e=sum( ((y-f)/g)^2+log(g^2))
}

#-------- MLE --------#

pk.nlm1=nlm(fmin1, c(0.3,6,0.2,1), y, t, hessian="true")
psi1=pk.nlm1$estimate</div></code> <br> pk.nlm2=nlm(fmin2, c(3,10,0.2,4),y,t,hessian="true") <br> <code><div style="background-color:#ffffcc; font-family:'courier new';font-size:12pt;">psi2=pk.nlm2$estimate
> cat(" psi1 =",psi1,"\n\n")
|style="text-align:left;background-color:white; color:red;" psi1 = 0.3240916 6.001204 0.3239337 0.4366948

| style="text-align:left; background-color:white; color:red;" | > cat(" psi2 =",psi2,"\n\n")
| style="text-align:left; width: 400px; background-color:white; color:blue; | psi2 = 3.203111 8.999746 0.229977 0.2555242





This paragraph is before the table.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod...

Col 1, row 1 Col 2, row 1 (and 2) Col 3, row 1
Col 1, row 2 Col 3, row 2

Note the floating-table to the right.





This paragraph is after the table. The text in column 2 will span both rows due to format specifier "rowspan=2" so there is no coding for "Col 2" in the 2nd row, just: Col 1 & Col 3.