File: lmMethods.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 (10 lines) | stat: -rw-r--r-- 195 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
library( "miscTools" )

# Construct a simple OLS regression:
set.seed( 123 )
x1 <- runif(100)
x2 <- runif(100)
y <- 3 + 4*x1 + 5*x2 + rnorm(100)
m <- lm(y~x1+x2)  # estimate it
nObs(m)
nParam(m)