> x1=1:10
> x2=1:10 + rnorm(10)
> y=x1-2*x2
> reg <- lm(y~x1+x2)
> reg

Call:
lm(formula = y ~ x1 + x2)

Coefficients:
(Intercept)           x1           x2  
  2.247e-15    1.000e+00   -2.000e+00  

> logLik(reg)
'log Lik.' 329.9206 (df=4)

> AIC(reg)
[1] -651.8411


This does work, can you give me an example when it fails? 


Kind regards,-- 
Dominykas Grigonis


On Saturday, 19 April 2014 at 20:49, fernando wrote:

> Hi Dominykas,
> 
> No, it is a plain vanilla code. Thanks
> Fernando
> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/Multiple-regression-information-criterion-tp4689113p4689115.html
> Sent from the Rmetrics mailing list archive at Nabble.com (http://Nabble.com).
> 
> _______________________________________________
> R-SIG-Finance@r-project.org (mailto:R-SIG-Finance@r-project.org) mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only. If you want to post, subscribe first.
> -- Also note that this is not the r-help list where general R questions should go.
> 
> 



	[[alternative HTML version deleted]]

