Sie sind auf Seite 1von 4

R Console (64-bit) Page 1

R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"


Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-w64-mingw32/x64 (64-bit)

R es un software libre y viene sin GARANTIA ALGUNA.


Usted puede redistribuirlo bajo ciertas circunstancias.
Escriba 'license()' o 'licence()' para detalles de distribucion.

R es un proyecto colaborativo con muchos contribuyentes.


Escriba 'contributors()' para obtener ms informacin y
'citation()' para saber cmo citar R o paquetes de R en publicaciones.

Escriba 'demo()' para demostraciones, 'help()' para el sistema on-line de ayuda,


o 'help.start()' para abrir el sistema de ayuda HTML con su navegador.
Escriba 'q()' para salir de R.

> utils::arrangeWindows(action='horizontal')
$`R Console (64-bit)`
<pointer: 0x00000000000804a4>

$`Sin nombre - Editor R`


<pointer: 0x000000000021029c>

> setwd("C:/Users/CORE I5/Documents/sealizacion vial")


> datos <- read.table("B1.txt",header=T)
> View(datos)
>
> require(MASS)
Loading required package: MASS
> require (ggplot2)
Loading required package: ggplot2
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ggplot2
> require (sndwich)
Loading required package: sndwich
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called sndwich
> require (msm)
Loading required package: msm
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called msm
> require(pscl)
Loading required package: pscl
Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called pscl
> require(boot)
Loading required package: boot
> require (foreign)
Loading required package: foreign
> logLik (j1)
Error in logLik(j1) : objeto 'j1' no encontrado
> logLik (M1)
Error in logLik(M1) : objeto 'M1' no encontrado
> logLik (J1)
Error in logLik(J1) : objeto 'J1' no encontrado
>
> summary( <J1- glm(ACC ~ NUMCARRIL + NUMINTERSEPCION + NUMPASOPEATONAL + MOTOCICLETAS, family =
"poisson", data = datos))
Error: inesperado '<' in "summary( <"
> summary(J1 <- glm(ACC ~ NUMCARRIL + NUMINTERSEPCION + NUMPASOPEATONAL + MOTOCICLETAS, family =
"poisson", data = datos))

Call:
You created this PDF from an application that is not licensed to print to novaPDF printer (http://www.novapdf.com)
R Console (64-bit) Page 2

glm(formula = ACC ~ NUMCARRIL + NUMINTERSEPCION + NUMPASOPEATONAL +


MOTOCICLETAS, family = "poisson", data = datos)

Deviance Residuals:
Min 1Q Median 3Q Max
-2.5490 -1.2362 -0.2163 0.5438 3.4832

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.586e+00 4.613e-01 3.438 0.000587 ***
NUMCARRIL -9.580e-01 2.757e-01 -3.475 0.000511 ***
NUMINTERSEPCION 5.945e-02 1.038e-02 5.726 1.03e-08 ***
NUMPASOPEATONAL 2.888e-01 1.215e-01 2.376 0.017480 *
MOTOCICLETAS 1.156e-04 2.458e-05 4.704 2.55e-06 ***
---
Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1

(Dispersion parameter for poisson family taken to be 1)

Null deviance: 128.617 on 16 degrees of freedom


Residual deviance: 31.042 on 12 degrees of freedom
AIC: 103.54

Number of Fisher Scoring iterations: 5

> m1 <- glm.nb(ACC ~ NUMCARRIL + NUMINTERSEPCION + NUMPASOPEATONAL + MOTOCICLETAS, data = datos)


There were 27 warnings (use warnings() to see them)
> m1 <- glm.nb(ACC ~ NUMCARRIL + NUMINTERSEPCION + NUMPASOPEATONAL + MOTOCICLETAS, data = datos)
There were 27 warnings (use warnings() to see them)
> m1 <- glm.nb(ACC ~ NUMCARRIL + NUMINTERSEPCION + NUMPASOPEATONAL + MOTOCICLETAS, data = datos)
There were 27 warnings (use warnings() to see them)
> m1 <- glm.nb(ACC ~ NUMCARRIL + NUMINTERSEPCION + NUMPASOPEATONAL + MOTOCICLETAS, data = datos))
Error: inesperado ')' in "m1 <- glm.nb(ACC ~ NUMCARRIL + NUMINTERSEPCION + NUMPASOPEATONAL + MOTO
CICLETAS, data = datos))"
> "m1 <- glm.nb(ACC ~ NUMCARRIL + NUMINTERSEPCION + NUMPASOPEATONAL + MOTOCICLETAS, data = datos)
)"
[1] "m1 <- glm.nb(ACC ~ NUMCARRIL + NUMINTERSEPCION + NUMPASOPEATONAL + MOTOCICLETAS, data = dato
s))"
> >m1 <- glm.nb(ACC ~ NUMCARRIL + NUMINTERSEPCION + NUMPASOPEATONAL + MOTOCICLETAS, data = datos)
)
Error: inesperado '>' in ">"
> logLik (m1)
'log Lik.' -46.76932 (df=6)
>
> m1 <- glm.nb(ACC ~ NUMCARRIL + NUMINTERSEPCION + NUMPASOPEATONAL + MOTOCICLETAS, data = datos)
There were 27 warnings (use warnings() to see them)
> summary(m1)

Call:
glm.nb(formula = ACC ~ NUMCARRIL + NUMINTERSEPCION + NUMPASOPEATONAL +
MOTOCICLETAS, data = datos, init.theta = 20665.07668, link = log)

Deviance Residuals:
Min 1Q Median 3Q Max
-2.5490 -1.2359 -0.2162 0.5436 3.4827

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.586e+00 4.615e-01 3.436 0.000590 ***
NUMCARRIL -9.579e-01 2.758e-01 -3.473 0.000515 ***
NUMINTERSEPCION 5.945e-02 1.039e-02 5.724 1.04e-08 ***
NUMPASOPEATONAL 2.888e-01 1.216e-01 2.376 0.017514 *
MOTOCICLETAS 1.156e-04 2.459e-05 4.702 2.58e-06 ***
---
Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1

(Dispersion parameter for Negative Binomial(20665.07) family taken to be 1)

You created this PDF from an application that is not licensed to print to novaPDF printer (http://www.novapdf.com)
R Console (64-bit) Page 3

Null deviance: 128.546 on 16 degrees of freedom


Residual deviance: 31.034 on 12 degrees of freedom
AIC: 105.54

Number of Fisher Scoring iterations: 1

Theta: 20665
Std. Err.: 618599
Warning while fitting theta: alternation limit reached

2 x log-likelihood: -93.539
> summary(m1)

Call:
glm.nb(formula = ACC ~ NUMCARRIL + NUMINTERSEPCION + NUMPASOPEATONAL +
MOTOCICLETAS, data = datos, init.theta = 20665.07668, link = log)

Deviance Residuals:
Min 1Q Median 3Q Max
-2.5490 -1.2359 -0.2162 0.5436 3.4827

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.586e+00 4.615e-01 3.436 0.000590 ***
NUMCARRIL -9.579e-01 2.758e-01 -3.473 0.000515 ***
NUMINTERSEPCION 5.945e-02 1.039e-02 5.724 1.04e-08 ***
NUMPASOPEATONAL 2.888e-01 1.216e-01 2.376 0.017514 *
MOTOCICLETAS 1.156e-04 2.459e-05 4.702 2.58e-06 ***
---
Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1

(Dispersion parameter for Negative Binomial(20665.07) family taken to be 1)

Null deviance: 128.546 on 16 degrees of freedom


Residual deviance: 31.034 on 12 degrees of freedom
AIC: 105.54

Number of Fisher Scoring iterations: 1

Theta: 20665
Std. Err.: 618599
Warning while fitting theta: alternation limit reached

2 x log-likelihood: -93.539
> summary(m1)

Call:
glm.nb(formula = ACC ~ NUMCARRIL + NUMINTERSEPCION + NUMPASOPEATONAL +
MOTOCICLETAS, data = datos, init.theta = 20665.07668, link = log)

Deviance Residuals:
Min 1Q Median 3Q Max
-2.5490 -1.2359 -0.2162 0.5436 3.4827

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 1.586e+00 4.615e-01 3.436 0.000590 ***
NUMCARRIL -9.579e-01 2.758e-01 -3.473 0.000515 ***
NUMINTERSEPCION 5.945e-02 1.039e-02 5.724 1.04e-08 ***
NUMPASOPEATONAL 2.888e-01 1.216e-01 2.376 0.017514 *
MOTOCICLETAS 1.156e-04 2.459e-05 4.702 2.58e-06 ***
---
Signif. codes: 0 *** 0.001 ** 0.01 * 0.05 . 0.1 1

(Dispersion parameter for Negative Binomial(20665.07) family taken to be 1)

You created this PDF from an application that is not licensed to print to novaPDF printer (http://www.novapdf.com)
R Console (64-bit) Page 4

Null deviance: 128.546 on 16 degrees of freedom


Residual deviance: 31.034 on 12 degrees of freedom
AIC: 105.54

Number of Fisher Scoring iterations: 1

Theta: 20665
Std. Err.: 618599
Warning while fitting theta: alternation limit reached

2 x log-likelihood: -93.539
> logLik (J1)
'log Lik.' -46.76916 (df=5)
>

You created this PDF from an application that is not licensed to print to novaPDF printer (http://www.novapdf.com)

Das könnte Ihnen auch gefallen