File: stdErTests.R

package info (click to toggle)
r-cran-misctools 0.6-30-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 368 kB
  • sloc: sh: 13; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 374 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
## testing stdEr() methods
library( "miscTools" )
data( "cars" )

# lm()
lmRes <- lm(dist ~ speed, data=cars)
summary( lmRes )
round( stdEr( lmRes ), 4 )

# nls()
nlsRes <- nls( dist ~ b0 + b1 * speed^b2, start = c( b0=0, b1=1, b2=1 ),
   data = cars )
tmp <- summary( nlsRes )
tmp$convInfo$finTol <- round( tmp$convInfo$finTol, 4 )
print( tmp )
round( stdEr( nlsRes ), 3 )