Skip to content

Departamento de Matematica

Sections
Personal tools
You are here: Home » Enseñanza » Materias » Primer Cuatrimestre 2013 » Modelo Lineal » ejercicio 16 práctica 2
Views
  • State: visible

ejercicio 16 práctica 2

Click here to get the file

Size 1 kB - File type text/plain

File contents

tablaAnova=function(salida,y){
p=length(salida$coefficients)
n=length(y)
ssreg=sum((salida$fitted.value-mean(y))^2)
ssres=sum((salida$fitted.value-y)^2)
ssT=sum((y-mean(y))^2)
F=(ssreg/(p-1))/(ssres/(n-p))
pr=1-pf(F,p-1,n-p)
salida=list(ssreg,p-1,ssres,n-p,ssT,F,pr)
names(salida)=c("ssreg","glssreg","ssres","glssres","ssT","F","pvalor")
salida
}
Created by mvaldora
Last modified 2013-05-16 02:13 PM
 
 

Powered by Plone