tests/lmMethods.R

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)

Try the miscTools package in your browser

Any scripts or data that you put into this service are public.

miscTools documentation built on May 3, 2023, 5:11 p.m.