Sie sind auf Seite 1von 83

1 JH @K IE K =

ANFAHE A J= A @A @=@ I 4

-HE? *=JEIJ= .AHHAEH= ,AL= E =GKAI @A 5 K =


:8 + CHAII @ I 2 I CH=@K= @ I @= 7. ) 7 ELAHIE@=@A .A@AH= @A =LH=I @A LA >H @A $

EE

5K

HE
L LEEE  = 4
4

EIJ= @A 6=>A =I EIJ= @A .ECKH=I  1 JH @K 1 JH @K


 ! " # $ 1 E?E= @ > AJ I A @ =HGKEL I .K AI > IE?=I 2A@E @ = K@=

!
! " $   !

*=EN= @ A E IJ= = @

! -IJ=J IJE?= * IE?=


! ,EIJHE>KE AI @A BHAG ! ! !! ! ! ! ! !! !  ?E= A IK=I HAFHAIA J= AI CH ?=I 8=HE LAEI GK= EJ=JEL=I 8=HE LAEI GK= JEJ=JEL=I @EI?HAJ=I 8=HE LAEI GK= JEJ=JEL=I ? @E= A@E= = @= ) F EJK@A 8=HE ?E= A @AILE F=@H A@E@=I @A @EIFAHI !! !! J K=I

#
# # %  " " # # $ $ $

A@E@=I @A F IE

EL
!!! !" !# !$ + A ?EA JA @A 8=HE= E A=H = =  A p

57

41
$ % % &

+ HHA =

1 JAHL= I @A ?

6AIJAI @A DEF JAIAI IE F AI  A p

" -IJ=J IJE?= -NFAHE A J=


" " "! ,A E A= A J 1 JAEH= A JA +=IK= E =@ ,A E A= A J A - I=E I A * ? I +=IK= E =@ I AIGKA = .=J HE=

!
! !# "

EIJ= @A 6=>A =I
! ! !! ,EIJHE>KE ,EIJHE>KE ,EIJHE>KE F !" .HAG ?E=I =>I KJ=I =?K K =@=I =>=EN @A .= A =?E = " @A .= @A BHAG @A BHAG @A BHAG ?E=I =>I KJ=I B= HA =JEL= BH A FAH FH FHEA@=@AI @A K = HACE D I F H ?=I= @A K = ?E@=@A F JE D I @A ?= A = A $ ' ?E=I =>I KJ=I B= HA =JEL= BH A FAH AH @A ?E=I =>I KJ= B= HA =JEL= BH A FAH >IAHL=@ A

?A JK= BF @= =JELE@=@A A ?A JK= BF @ ?A JK= BF @ FAI

LE

156) ,- 6)*- )5

EIJ= @A .ECKH=I
 ! ! ! !! !" 6A = E E?E= @ 4 A A I=CA -IGKA = @A K = /H = >EA JA 9E @ MI = >EA JA 9E @ MI # $ $ FH FHEA@=@AI % & AH @A D I F H ?=I=  F A F K = C ! ?E=I =>I KJ=I =?K K =@=I 4 I =I JH I !! LEIK= @ ANFAHE A J A ,*+ ? > ? I !$ !% LAEI @A E K E = !' " ANFAHE "! @A @=@ I @ AJ A FH @K @A L I @A L I =I @EBAHA JAI E K E @E=I @ I AIJK@A JE =@= JAIJA @A ,K K J !

= JA J=H I=EH @ 4 A > AJ

? @A ? K =I @=I FHE ?EF=EI =JELE@=@AI A ? @A >=HH=I @= ? @A FE = AI = L=HE LA AI DEIJ CH= = ? AI = IEJK=

HKH=EI > /H = CH > CH

5AJ CH= = K CH

? @A E D=I @= L=HE LA ? @A ? K =I @= >

= 0EIJ CH= = @ FAI @A F JE D I @A ?= A = A E D= @A FH @K @A BHAG ?E=

!#

CEL=I HAFHAIA J= @ =I BHAG

=?E = @A A =>=EN @A A IAK HAIFA?JEL ? @EC A


" " "! "" "# "$ 1 LAIJEC= B= A @=I 1 LAIJEC= JEF @A E K E = = AI A > LEIK= @ JA F @A A C H@= @A IK

= -NF H=J HE= @= FH @K 6AIJA @= @EBAHA + = A JHA

I @EBAHA JAI > ? I

>=IA=@ I = @EIJHE>KE JH=IJAI >=IA=@ I A J B=J HE= A

-IJ=J IJE?= ANF H=J HE= @ I ? > ? I

LEEE
"% "& "' 1 LAIJEC= 1 LAIJEC=  "  6AIJA 6K AO F=H= @EBAHA ?E=H =I "  6AIJA 6K AO F=H= @EBAHA ?E=H = LA @= =H?=I =H?= @= E JAH= @= E JAH= F

156) ,- .1/74)5
J @A LA @= N =H?= N F =H?=I F =H?= F J @A LA @= "% J @A LA @= J I @A # "' I @ EI F "# "$

J @A LA @=

6AIJA @A 6K AO F=H= @EBAHA ?E=H =I

+=F JK

1 JH @K
-IIA =JAHE= HABAHA JA = E E ?KHI I >HA I BJM=HA 4 :8 + E EIJH=@ CHAII @ I F H -HE? *=JEIJ= .AHHAEH= A ,AL= E I > AJEL I @AIIA E E ?KHI I 4 F=H= AIJ=J IJE? I A =GKAI @A 5 K =

2 I CH=@K= @ I @= 7 ELAHIE@=@A .A@AH= @A =LH=I )2/ 7. )

,=H

AI CAH=EI @ FH CH= = A @= E CK=CA AIJ=J IJE? I KIK HE I

-NF H=H BAHH= A J=I


F=EI ? K= @A @=@ I )

E F A A J=@=I EIA + K

4 F=H= E@=H ? 4ACHAII ? I

I FHE ?E 5E

?AEJ I @A -IJ=J IJE?= > IE?= -NFAHE A J= >E =J HE= A CH

8= A A >H=H GKA AIJA I? =FA =I IA @AJAH = ANF H=

?KHI @A AIJ=J IJE?= 2 HJ= J ? = @ I A E CK=CA

J @ I 4

?AEJ I > IE? I =GKE @EI?KJE@ I I

IE@AH=@ I I=>E@ I A I =KJ HAI

@AJ= D=@= @ I ?

1 JH @K

+=F JK

1 JH @K
4 K K = E CK=CA FH AJ / 7 IE E =H I BJM=HA @EIF  F @A =CA E A=H A H=EI ? =IIE ?= J I B HJAI @ 4

= 4
A = >EA JA F=H= ? E CK=CA FKJ= AIJ=J IJE?= A CH ?= A = >EA JA 5 @AIA L LE@=

*A

=> H=J HEAI F H

D +D= >AHI A ? => H=@ HAI E>E E = K = CH= @A L=HEA@=@A @A J @ I J @ I AIJ=J IJE? I ?=I 7 @ I E A=H JAIJAI AIJ=J IJE? I ? IIE? I I HEAI JA F K JEL=HE=@ I AJ? A J ? E?=I CH GKA CH ? I >A F @A I =JA @A BK IAH FH @K E@ I ? JE? I GK= @ AI =JA = B=?E E@=@A ? > @A E A=@ I A @A F IIE>E E@=@A @A

= J= GK= E@=@A F=H= E FHAII E ? KI @A B H K =I A I - A IA FHAIJ= = @ELAHI=I BK I= @ FA = E JACH= @A ? ) FAH EJA FAHI F AN=I = @EII = E =H A K A @AHEL=

A?AII HE JE?=I =J = HA= E = ? I GKA > I =EI

AI @AI@A K = ?= ?K =@ H= ?EA J ?= F=I

EIAI AIJ=J IJE?=I 4 J= > CH ? =FHAIA J= K = I HEA @A HA?KHI I CH ? ? H JEF A J= = D @A AJH= I I @A BK @ A KEJ @AJ= D=@= @A J @ I I =IFA?J I GKA IA F @A GKAHAH J I E D=I ACA @=I F =

= @AI?HE

J JK I A IK> J JK I F

 *=EN= @ A E IJ= = @
4 ? @EIF E>E E =@ I > I JAH K CH= @A I @= / 7 /A AH= 2K> E? E?A IA @= .HAA 5 BJM=HA . K @=JE FE =@ A H @= A = B H = @A ? @EC =>AHJ - A F @A IAH

AH @A F =J=B H =I 7 1: A IE E =HAI

"
E ? KE @ .HAA*5, A E KN 6= > @ MI 'N @ M 6  A =? 5 F @A IAH ?

1 JH @K
FE =@ A H @= A

= 4
9E

=@ @ 4 CH=JKEJ @A GK= GKAH AIFA D @ IEJA MMM H FH A?J HC

)F I A JH=H AIIA IEJA ? EGKA A IACKE@= AI? D= K 7 ELAHIE@=@A .A@AH= @ 2=H= ? D= IAK IEIJA = FAH=?E L ? = F ? FEJ= A JHA >=EN=H JHE>K @ I 5KF ?

+4)
DJJF

C =>=EN @= F= =LH= , M F H ANA F ?H= >H H FH A?J HC

=@

AIFA D FAHJ @A L ? = F H ANA F

AIFA D @= )C H= AI

9E @ MI '# = @ =JAH )GKE


4 FA = FHE AEH= LA AI? D=

K J @A F=? JAI > IE? I K I F=? JAI ? +4) DA =FHAIA J= K = I HEA @A F AI =HGKEL ANA?KJ LA F H ANA F =@= =I LAHI AI A JE K= K == LAEI ? HA =EI I

@ GKA L ? AIJ >=EN= @ AIJ= F CE = J 

>=IA

HA=@ A ?D= CAI AJ? -I? D= "  ME ! ANA 2H


) E IJ= = @ 4

I >=EN=H A ANA?KJ=H KEJ B ?E A =KJ @EHA?E =H E@E 2 H = 2 HJKCK I *H=IE  F=H= =I L= A J=H GKA FA

HA?A JAI >=HH=I @A =J = LAHI A 1 C I

F II LA E ? KIELA IA A?E A KI A " I = I=CA I @A AHH AI @=I BK

AI @ I =JHE>KJ I A I DA FI ? @EIF E>E E =@=I +4) >AJ= 

) ?=@= = ?

@K=I LAHI AI @ 4 I @EII

?=@= IA AIJHA ) LEI=@= =I

IA FHA ANEIJA

@K=I LAHI AI @EIF

EJ= JA A JA K = LAHI =EI HA?A JA

= B= HALEI=@= A K = LAHI

1 E?E= @
? K = >=HH= @A 

4
4 A = >EA JA 9E @ MI IK= JA = A I=CA I > IE?=I A K = HACEIJH @ 4 ?EJ=H I=EH @ 4 = EFK = BHA JA @ DAH@=@ @A GKA IA L = .ECKH=  4 ? =>AHJ= A K = CK =I

7 = LA GKA L ? ?D= = .ECKH= @EIJHE>KE IJH= ?

FH

FJ LAH A D

)I E B H = AI > IE?=I IA HABAHA IAKI ? => H=@ HAI ? FA@EH = K@= A ?

I IK=I HACH=I @A FA@EH K = @A

) >=HH= @A

A K JH= @ELAHI I > J AI @A =J= D F=H= = LAH A D F

@A =HGKEL I F=? JAI = K@=I AJ? IE = @A =E H GKA A E CK=CA I ? 5 , 5 A E @E?=

FH
J

FJ

FH

FJ

@A IA @ALA E IAHEH =I E D=I

1 E?E= @

4
Barra de menu e botes que facilitam o uso do R em ambiente Windows

Informaes bsicas dadas sobre o R toda vez que ele iniciado

Prompt indicando que o R est pronto para receber linhas de comando

.ECKH=

 6A = E E?E= @ 4 A

= >EA JA 9E @ MI

@A ?

= @

A >HA IA JK@

GKA L ? @EIIAH = 4 ?=H E FHAII 4 DA HAIF @AH ?=H E FHAII A ? = @ G I AI = K

JA = = ? H LAH A D= A JK@ GKA

) JA J=H I=EH @ 4 FA = >=HH= @A K = A I=CA FAHCK J= @ IA K IA = IA I > AJ I =JHE>K @ I @ALA K IA JK@ GKA B E BAEJ @ALA IAH EC L= A JA ?HE=@ I I = ?=HHAC=@ I =KJ

A K K FA

IJH=@= L= HAI

KIK HE @AIA = I= L=H = HA= @A JH=>= D FAH = A?AH ? H=@ .ECKH= )?  3K= @ IA E E?E= I > AJ I = JAHE H A JA IA D= IA GKA J @= = E B H

4 =F I JAH I= L = HA= @A JH=>= D =JE?= A JA

@AIA =@= IA = CH=L=@= A J=

KJH JEF @A =HGKEL A = HA= @A JH=>= D BKI AI GK= J = L= H @A > AJ I =

IA = H=H= A JA I= L= 1II ALEJ=H ? IA B= AH K = ?

1 JH @K

= 4

.ECKH=

A I=CA

= JA J=H I=EH @ 4 A

= >EA JA 9E @ MI

> AJ I
=EI GKA K I BJM=HA GKA HA= E = = @A FH CH= = EIAI AIJ=J IJE?=I 4 K AA = >EA JA A AH I LAJ HAI > AJ I @A L ? F @A JE?=I F @A HEA J=@= = > AJ

K = E CK=CA .ECKH= CK=H@=H

=JHE AI =HH=OI @=J= BH= AI A EIJ=I F @A ! 2 @A IA A JA @AH > AJ ?

?=H =H = A =@ I A K = ?=ENE D= =JA

GKA GKEIAH ) F=HJEH @= J @=I =I FAH= AI

IAH BAEJ=I KI= @ AIIAI > AJ I 1II J H = =I ? EI=I

=EI IE F AI

Nmero Vetor Matriz Array Lista

Nome Objeto
.ECKH= 2=H= ?HE=H K IA ? KI= @ ?= K > AJ ! -IGKA = @A K I =JHE>KEH K > AJ > AJ

Data frame

L= H = K

K IA = GK= @ =JE = AEH=I

L= H @A JH @A K

AIJA F=II= = ANEIJEH =KJ

?= A JA 7 = =JHE>KE

F @A IAH BAEJ= >=IE?= A JA @A @K=I

IE = @A = K KI= @ K = IAJ= B H =@= FA = K

@ I IE =EI @A

!
A
> AJ

> AJ I
H GKA A A I <
JA GKA AII= IAJ= IA FHA @ALA AL=H J=H F=H= = E CK=CA >A J 4 2 HJ= J IE = @A ?

%
L= H =

K IA = IA FHA =F KJH IE = KEJ JE

F II LA KI=H = A J HE  K

IAJE D= A

= >=I =I @EHA AI < K > GKA B H AI?HEJ IAH E JAHFHAJ=@ ?

IA = IE = = F=HJEH @ GK= ? = = @ AH ANA F

F II LA =JHE>KEH =FA =I K =JHE>K= AH 2 = >A J a A

AH = K AH 5 =

> AJ > AJ x

2 H

= N #

= HA?A>A N HA?A>A #
=FA =I @ECEJA IAK FHE AEH= F IE A JA? A K

2=H= LAHE ?=H GK= J L= A ?=@= > AJ

A JAH
IA = K

A JHA ? ?DAJAI IA HABAHA AH A JA @E@ ?

@ LAJ H

LAJ H @A K = F IE

= 
7 = LA ?HE=@ I BK I > AJ I F @A IAH KI=@ I A ? J=I AGK= AI

AI IEIJA =I AJ?

= N      % = N ! = N  = N  " = N !

I

IK>JH= FH @KJ I @A AI?= AI @ELEI F JA ?E=

HAIK J=@ @A K = ? K JAH?AEH > AJ

J= F H IK= LA

F @A IAH CK=H@=@ @A JH @A

&
? ?  $" = ! N

1 JH @K

= 4

> 8AJ H GKA

LAJ H @= E CK=CA LAJ H @= =JA = @A L= HAI 4 ?

4 JA

IEC E ?=@ K LAJ H IAH

F K? @EBAHA JA K J AH I IJHE CI =EI = F GKA

JE?= 2=H=

4 K

GK= GKAH ?

K E@E A IE

-IIAI L= HAI F @A LAJ H JA K

F= =LH=I K L= HAI KJH=I F= =LH=I F=H= F=H= = ? =JA JE?= 2=H= IA =JHE>KEH K = @ ? F=H JAIAI

CE? I . F=H= B= I A 6 F=H= LAH@=@AEH  IEC E ?=@

K J @A L= HAI = K

> AJ F @A IA KI=H

@A I L= HAI L

IAF=H=@ I F H L HCK =I @A JH @ I

@ ?# &  @ 

! # '   ! # '   

@ HA?A>A K

LAJ H

#  &  

F II LA IA HABAHEH AIFA?E ?= A JA = K = F IE GKA IA @AIA A I=>AH GK=

@ LAJ H 1 =CE A @ LAJ H > AJ A @

L= H GKA ?KF= = GK=HJ= F IE

-II= HABAH

?E=

BAEJ= A JAH ? ?DAJAI =F I

@ "  ! #

"= F IE?=

LAJ H @

? BK A

=JHE

7 = JA ?

=JHE

=JHE>K @= = K ? =JHE

> AJ FA = BK K J @A @=@ I AII= H@A JA GKA K IA = ? >IAHLA

=JHEN -II=
AH @A E D=I ? K J @A IA =I ? K =I ANA F

=HCK A J I = H@A

AH @A ? K =I @= A

@=@ I @ALA IAH AI?HEJ AIJELAIIA

@=I ? K =I

AEH=@=I K =I I >HA =I KJH=I

A A

=JHEN?# &   ! #   '

! # ' 

! A HA?A>A K =

=JHE

> AJ I
& ! #
=I K K F H =JHE AI J= > AA A J

'

F II LA HABAHA ?E=H K = E D= K = ? K = L= A JA @ALA IA KI=H FHE AEH= F IE AH I A JHA ? ?DAJAI IA HABAHA = E D= A IA

HAIFAEJ= @ = H@A

CK @= F IE

IA HABAHA = ? K =

A    A ! '  A  ! '

 E D= & ! # ? 

@= =JHE

A A ? K = !

K = ! @= =JHE @=

A A A J

E D= 

@ )HH=O -IIA JAH A =EI @A

1 C I

F IIKE JH=@K ? K J @A

=@AGK=@= - A HAF AH I =HH= =@ I =HH=O F @A IAH

HAIA J= K = DEFAH =JHE A JA @E@ ? )GKE = HABAH F IE ? > AJ FHA ?D =HH=O ) FHE AEH= F IE @= BK K ?

K IA = K K J @A

@E A I AI 3K= @ JA

! @E A I AI K

=JHE AI @A

AI = @E A I =JHE AI A = JAH?AEH=

?E= = E D=I A ? K =I =

AI = @=I

@ I ? ?DAJAI IA HABAHA = L= H @A E JAHAIIA = JAH?AEH= @E A I = @ KI=@ E IAHEH K ?

=HH=O 7 = B H = @A =JHE>KEH K
KJH= F =JHE A KI= B= AH K =?

=HH=O = K LAJ H GKA IJHK @

=HH=O @A AH I  =I @E A I AI @AIA =@=I A @AF EI F H? K = F H

I L= HAI =@AGK=@ I

HAIFAEJA = H@A

=HH=O IA HABAHA = I =HCK A J I @=I


IA HABAHA I @E A I AI @ AI

JHE AI A = IACK @= F IE

B =HH=O ? B B
K

 ! "

=HH=O @A  FHE AEH=  IACK @=

AH I =JHE =JHE

=JHEN?

=JHEN?# $ % &


B =HH=O? B     ! " ! " # $ ?

1 JH @K
 @A K = I LA

= 4

  # $ % &
L= H GKA ?KF= = FHE AEH= =JHE @ > AJ B

) = C= A JA F @A IA FAHCK J=H GK= E D= @= IACK @= ? K = @= IACK @=

B   %

A ,=J= BH= A -II= AIJHKJKH= @A @=@ I JHKJKH= >E@E A IE BH= A =I 5K= BK = @A @=@ I 2 @A @EII AH I A IJHE CI )

K = AIF ?EA @A J=>A = @A AI B= AH F=HJA @A K F @A IAH @=@ I AN AF AI @=J= AI I ? K

@=J= BH= A 8A =

C @=J= BH= A =H?= ?9 ?!  C =H?= 2HA  9 I !  .E=J & ! . H@ '# & '#

I .E=J . H@ 2HA

B

EIJ= 7 = EIJ=

K J @A > AJ I @A J= = D I A =JKHA =I

" A @ =HGKEL I
@EBAHA JAI - = @= E CK=CA HACE@= FA = BK IE@AHA K = ANA F =JHE


EIJ -II=
= AIJHKJKH= J K =EI CAH= AH

4 5K=I F IE AI I

@AIEC =@=I F H @A EIJ= GKA ?

AH I A JHA @ EI

F=H JAIAI [[ ]] + = FHE AEH= F IE AK

= IACK @= K = F= =LH= = JAH?AEH=

LAJ H = GK=HJ=

D D   !

EIJ!

=JHEN?

! "

  EIJ= ?# $ % &

   ! " !  " 
5KF ?=@

 EIJ=

# $ % &
D= GKA IA @AIA A I=>AH = F IE GK=HJ= F IE JAH?AEH A A A J @ LAJ H GKA AIJ = @= EIJ= h

D "  %

"
) =HGKEL I

A @ =HGKEL I
= AEH= =EI B ?E @A E IAHEH @=@ I A > AJ I 4 = AEJKH= @A =EI ? F AN I 4 F @A AH =HGKEL I @A AIJHKJKH=I IE F AI ? F II LA E F HJ=H KJH I JEF I @A =HGKEL I =I I FH ?A@E A J I @A E F HJ= I =I ANJA I AI JNJ JHELE=EI A

A H 6= > ? I NI


IAH I= L= JH=J=@ I =GKE ? GKA IA =? IA D= GK= @ IA JA H = A JA

1 JH @K
K =HGKEL

= 4
NI

JNJ A B= AH = AEJKH=

8= A A >H=H GKA GK= @ IA I= L= K = HA= @A JH=>= D L= HAI @ I > AJ I I HAIK J=@ I 2 H AIIAI =II ?E= KEJ =K JAEI I JEL I CK=H@=@ I 6 @ I I ? > AJ I I B HJA A JA HA? =H = A =@ I A FAH@E@ I

=FA =I I

= @ I @=@ I A J @ I I

A @=@ GKA IA JH=>= DA = 4 A ?E= ) CK I A@EJ HAI @A JANJ J=I @ 9E @ MI 6E 4

A@EJ H @A JANJ @= IK= FHABAH

I?HEFJ @ 4
- =?I

* ? @A

9E -@J A ? BK A K

-IIAI A@EJ HAI I E@ I FA 4 = BK

KI=@ I J= J F=H= A => H=H I BKJKH= @= = EIA

=HGKEL I @A @=@ I GKA IAH K J I @A E D=I @A ? 2=H= AH K > AJ =HGKEL =HGKEL A

4 GK= J F=H= =H = A =H H JE =I =EI KI=@= = HA=@ J=> A -II= IA HABAHA = JA A @ IA

= @  F=H= = HAFAJE =H = A = IA @AIA =@ 

= B H = @A @=J= BH= A - JHAJ= J

FHE AEH =HCK A J @AII= BK

=HGKEL = IAH E@ A @AHA KC=H @AII= BK =HGKEL @K=I F AI  @A IA A ?

-IIA =HCK A J @ALA LEH A JHA =IF=I = >=HH= @A JH= A K > J )HGKEL

@AIIA =HGKEL J= > =HGKEL

@ALA IAH F=II=@ = 4 2=H= EII   -I?HALAH J @ A @AHA

K@=H @EHAJ HE F=H= @ =HGKEL JE@=I IACK @ =HCK A J @ALA IA @ECEJ=H K@= @EHAJ HE A @AHA

@A JH @ FHE AEH =HCK A J @= BK IA HABAHA = ?=>A = D  5A =I ? K =I JELAHA JH HE KC=H

HA=@ J=> A

A @=I ? K =I @A @=@ I ?

?=>A = D DA=@AH A J

D 647- ?=I ?
-NA F I @A ? @A AEJKH= F=H= E B H =@ = BK

D .) 5@A =HGKEL AIJ =H = A =@ A GK= @

= @ @A AEJKH= @A =HGKEL GK= @ IA

HA=@ J=> A HA=@ J=> A+

A JNJ D 647- AKI , ?K A J I A JNJ D 647-

# .K
)GKE I

AI > IE?=I
=FHAIA J=@=I = CK =I BK AI @A KI ? IJ= JA FAHJA ?A JAI

= I F=? JAI > IE? I @ 4

$ 2A@E @ = K@= IK N I


= J @ I I A A A J I @A K ? FHE A J @A K AH N LA AI ?E= @A KJH =I BHAG ?E=I =>I KJ=I @A ? HH AH I ? > AJ N > AJ N

!

A CJDN HAJ H = HAFN  HAFAJA

IAG= > >O ? CAH= K = IAG


J= JAI c K E@=@AI K @

JE@ I A JHA a A b @EI

J=> AN HAJ H = K = J=>A = ?


@= ?=@= A A A J @A N

?E=

$ 2A@E @ = K@=
AEJ =EI B ?E @A IA =FHA @AH = KI=H 4 ? IK J= @ ? IJ= JA A JA 4 IAKI J FE? I @A = K@= -NEIJA = DA FBK EIJ A ? KI >=IE?= A JA GK=JH JEF I @A = K@=

 -II= = K@= @ALA IAH I ?EJ=@= GK= @ IA I=>A @= AN I=>A IA IAK F=? JA GKA ? J @= A AN=J  AII= BK =I ANEIJA @ LE@=I AIJELAH E IJ= =@ A = 5A

?E= @A K = BK

?=HHAC=@

IAH =>AHJ= = @ ?K A J=

AI = F=H= AI? =HA?E A J I ?E= @A K = BK ) >KI?= K IA = IA K = IEC E ?= GKA = A I A IAK

> DA F IA=H?D  3K= @ IA @AIA = E LAIJEC=H = ANEIJ AII= = K@= HA?A>A K = F= =LH= ?D=LA A BK BAEJ= >KI?= BK ? FKJ=@ H AI GKA ? J =GKA = F= =LH= A ? A DK I F=? JAI ANEIJA JAI HAJ H =H ANEIJ=

1 C I A HAJ H = J @=I =GKA =I IK= @ ?K A J= GKAIJ

FKJ=@ H A

HAIK J=@ =@AGK=@ ANEIJA FA

5EC E ?= GKA A =

? ) K@= 0J > J DJ BK BHAG GKA ? J

-II= = K@= F @A IAH ?D= =@= FA = >=HH= @A 3K= @ =?E =@= A = =>HA K @ELAHI=I E B H = AI I >HA

A K IK=I =EI

) K@= 0A F

@ ?K A J A

4 IK= E CK=CA

AI > IE?=I IAKI F=? JAI IAKI =KJ HAI IK= E?A I= FAHCK J=I JAI AJ? A?J=@

@ 45EJA5A=H?D  3K= @ ? @A K = F= =LH= ?D=LA A

E JAH AJ AII= = K@= B= = >KI?= =@=I ?

J @=I =I F CE =I @= E JAH AJ HA =?E

"
4 FHE ?EF= A JA =GKA =I F CE =I FK> E?=@=I ? IAH A ? JH=@=I

1 JH @K

= 4

=I FAHCK J=I A A =I I L=I LAHI AI AJ?

HAIF IJ=I @=I EIJ=I @A @EI?KII AI @ 4 -NEIJA @A @E?KII AI GKA F @A JEH=@=I @ LE@=I @ 4 I - =I ? A = J ?= 4 =EI CH=LA I

@ELAHI I JEF I @A EIJ=I

= F CE = @ 4

@=@=I IKCAIJ AI F=H= =I ? J=J ?

@AILA @=@ I A @AI? >AHJ FAGKA I KIK HE I @ 4 A

I AHH I @A FH CH= =

I AIJ=J IJE? I GKA B= A

3K= @ IA @AIA = I=>AH E B H = AI =?AH?= @A K = @=@= BK @ALA IA @ECEJ=H DA FBK I=>AH IA K J FE? F IIKE BK

ANEIJA JA

 K IE F AI A JA
4 ?

BK

 +=I IA @AIA A

= @ @ALA IAH DA F IA=H?DJ FE? 

+=F JK

-IJ=J IJE?= * IE?=


!  ,EIJHE>KE AI @A BHAG J= AI CH ?=I
!   8=HE LAEI GK= EJ=JEL=I
-NFAHE A J I K FAIGKEI=I GKA F IIKA F @A IAH @AI?HEJ I HAIK E@ I F H A CA DAEH =CH K == IJH= ? B= K JA @ IK=I HAFHAIA J= AI CH -N 7 @=@AI =CH ? =I A ?=I ) IACKEH K ? ANA F B ? L=HE LAEI GK= EJ=JEL=I ?E= A E KIJH= FH ?A@E A J AE @A @EIJHE>KE AI @A BHAG

?E= A IK=I HAFHAIA

AL= J= A J @=I FHE ?EF=EI =JELE  FH FHEA@=@AI @A ?AHJ= HACE HAIK J=@ @= FAIGKEI= + +

?H GKE = IACKEH HAFHAIA J= AIGKA =JE?= A JA + + 5 + 5 ) + + +

8= HAI =IIK E@ I FA = L=HE LA = A=J HE= = FAIGKEI= ?=B + AEJA


  IE LE?K JKH= 5 E D   I = 5  =H= =  ) ?E= IAH =CHKF=@=I A K = ?=JAC HE=

,EIJHE>KE

@A BHAG

J= ? =IIAI F K? BHAG A JAI F @A


KJH=I A JE KC=H

=J

?+       +   5      +   + 5

  +  ) +   + +

$
J=> =J @B ? J=> A=J ?B= BH BF

-IJ=J IJE?= * IE?=

=JHEN # ! = AI@B ?+=BA  AEJA  E D   KJH=I 6 J= 

H M = AI@B @B   @B  @B !  @B "  @B #  B HE E B HE E

J=> =J + J=> =J   J=> =J   IK J=> =J 5  A CJD=J  #  # @B E @B E ! @B E  @B E A CJD=J  J=> =J 5 J=> =J  ) 

6=>A = !  ,EIJHE>KE

@A BHAG

?E=I =>I KJ=I B= HA =JEL= BH A FAH

?A JK= BF @= =JELE@=@A A

FH FHEA@=@AI @A K = HACE

)JELE@=@A +=B AEJA ED KJH=I 6 J=


. JA ,=@ I ?J ?E I

B=
& # " !

BH
 "  #    #

BF
"  #    # 

 

 

/4 .1+ 4AFH @K = A @A ? K =I IAK ?

,- *)44)5 - +

7 )5 ? @A >=HH=I A @ CH ?

FKJ=@ H = H JE = @ CH

C? ? C?

>=HF >=HF

J@B  " J@B  "

N => )JELE@=@A O => .HAG A CJD " D HE

?E= HA =JEL= ?E=

CH=OIAG "  

647- O => )JELE@=@A N => .HAG A CJD "

HA =JEL= ?

CH=OIAG "  

!  ,EIJHE>KE AI @A BHAG

?E= A IK=I HAFHAIA J= AI CH

?=I %

0.4

Freqncia relativa

0.3

Atividade

0.2

0.1

0.0

Cafe

Leite

Milho

Outras

Cafe

Leite

Milho

Outras

0.0

0.1

0.2

0.3

0.4

Atividade

Freqncia relativa

= .ECKH= !  = /H HKH=EI > /H ? @A ? K =I @=I FHE ?EF=EI =JELE@=@AI A AI = IEJK= BAEJ I ?

> FH FHEA@=@AI

? @A >=HH=I @=

JA GKA I CH >=HF J  = CH ? ?=I @=I >=HH=I K A AI ?=H

? I @A >=HH=I A ? K =I I = =I A >HA IA JH GKA JH ?=@ I ,- 21 )

AI = BK

E?= @EBAHA

=HCK A J D HE GKA @ALA IAH LAH@=@AEH A @ I AEN I = E LAHJAH

/4 .1+ CH FH F H?E +

7 5-6 /4) ) K ? H?K ? IAJ HAI @A HA=

? @A FE = J HJ= K IAJ CH= = = H= ? I BHAG ?E=I @A ? HH IAJ CH= = B= AH K 4

?E= @A ?=@= L= H @= L=HE LA = A=J HE=

FEA@B  "
) BK =EI GKA I

CH=OIAG "  
=HCK A J K

A CJD " H=@EKI  #


> AJ ? JA @ AH I @A?E

FEA ANECA ? A

K IA = BHAG

?E=I HA =JEL=I

!
8A =

8=HE LAEI GK= JEJ=JEL=I @EI?HAJ=I


IACKE JA ANA F HA= K = FAIGKEI= @= 5A?HAJ=HE= @A 5= @A AH @A D I F H ?=I= ) IACKEH K E? FE E LAIJEC K

2 > E?= @A K

&

-IJ=J IJE?= * IE?=

Cafe

Leite Outras

Milho

.ECKH= !

5AJ CH= = K CH

? @A FE =

AIJ =FHAIA J=@= K = F=HJA @ I HAIK J=@ I >JE@ I ! "   ) 6=>A = ! F H ?=I= A K " "  "  !   !   !  ! ! !  "  " "  ! ! !  ! ?E= @ AH @A D I

=FHAIA J= = @EIJHE>KE @AJAH E =@ K E? FE

@A BHAG

,A B H = IA A D= JA F @A IA B= AH K = @EIJHE>KE 4? F @ IA K > AJ @B ANA F

@A BHAG

?E=I

BE D I ! @B ? "

?! " !  !

 

" "  !

" " ! !  

  "    ! !  ! ! J=> ABE D I ?B= BH BF ?  ! " 6 J= 

J=> BE D I = AI@B

=JHEN $ !

H M = AI@B

!  ,EIJHE>KE AI @A BHAG
6=>A = ! ,EIJHE>KE

?E= A IK=I HAFHAIA J= AI CH

?=I '

@A BHAG

?E=I =>I KJ=I B= HA =JEL= BH A FAH

?A JK= BF @

AH @A

D I F H ?=I= @A K = ?E@=@A

+ =IIAI   ! " 6 J=
. JA ,=@ I ?J ?E I

B=
!  '  %

BH
 %#  #  #  %#  %#

BF
% # #  # % # % #

"

 

 

@B   @B  @B !  @B "  @B #  @B $  B HE E B HE E

J=> BE D I  J=> BE D I  J=> BE D I   J=> BE D I ! J=> BE D I " A CJDBE D I  $  $ @B E @B E ! @B E  @B E A CJDBE D I 

/4 .1+ 4AFHAIA J= JAHE H A CH @= @EIJHE>KE

,- 1 0)5 ?E=I @ I @=@ I @ ANA F =

@A BHAG

? I @A E D=I A ? K =I

C C>

J@B  # J@B  #

JOFA D N =>  ? O => BH

AH

@A BE D I O => BH

>=HF

CH=OIAG "   A CJD #

N => 

AH @A BE D I

-IJ=J IJE?= * IE?=

3 Nmero de filhos

0.00 0.05 0.10 0.15 0.20 0.25

fr

0.20

0.25

0.10

0.15

fr

Nmero de filhos

= .ECKH= ! ! = CH CH ? @A E D=I @= L=HE LA AI = L=HE LA AH @A

> D I F H ?=I= >

? @A ? K =I @=

!  ! 8=HE LAEI GK= JEJ=JEL=I ?


+ IE@AHA IACKE JA ANA F F ?=H ? = AIFA?E ?= =EI GKA D I @A ?= A = A A L=I=@ H= ? +=I ? =? JH HE

J K=I
I? 2 H EII #C @ FH @KJ ? 5A = AI=@=

K = E D= @A A L=I= A J @A F JE A ?D = A FHAI= AIJ=H IA @

AIFA?E ?=@

IK E@ H IAH A C= =@ GKA =GKE I

LA EA JA B= AH IJH= @A # H@A ?HAI

F= D= A J @ I F JE D I A L=I=@ I + AJ K IA K = = @EIF IJ I A C

F JE D I @AII= E D= @A FH @K ?A JA A

"# "$ ' "' ! # # # #

"# ! "% ' "' % # $ # %

"# " "&  "' & # & # &

"# % "&  "' ' #  #! 

"# ' "& ! #  #  #" '

"$  "& # # # " ## 

"$  "& & # ! # $ ##

"$ "& & # " # $ ## !

"$ # "'  # # # % ## %

"$ $ "' # # # ' ## %

 n < 100 k =

n = 50 = 7, 07 7 ? =IIAI

  A = 55, 7 45, 2 = 10, 5g

!  ,EIJHE>KE AI @A BHAG
! c =
A k 1

?E= A IK=I HAFHAIA J= AI CH

?=I

10,5 71

= 1, 75g 44, 33g


@A BHAG ?E=I @A K = L=HE LA

" LI1 = 45, 2 8A = ? GK= JEJ=JEL= ? ?

1,75 2

IJHKEH K = @EIJHE>KE J K=

?= A =

?"#

"# ! "# " "# % "# ' "$  "$  "$

"$ #

"$ $ "$ ' "% ' "&  "&  "& ! "& # "& & "& & "'  "' "' ! "' % "' & "' ' #  # # @B ? & #!  #" ' ##  ## =JHEN & ! = AI@B ?B= BH BF ? "" !! "$ &  "$ & "% &!  "% &!


# ! # " # # # # # # # # %

# $ # & #  #  # " # " # $ # % # ' # ## ! ## % ## %

H M = AI@B

"' #&  "' #& # !!  # !! #! &  #! & #" &!  #" &! #$ #& 6 J=  J=> ?= A = @B  %  @B &  B HE E B HE E J=> A?KJ?= A = >HA= I ?"" !! "$ & "% &! J=> ?= A = A CJD?= A =  &  & @B E @B E ! @B E  @B E A CJD?= A = 

"' #& # !! #! & #" &! #$ #&

0156 /4) ) ) HAFHAIA J= JEL=I ? AIJK@ J K=I K KIJ=F IJ=I A CH ?= =EI KI=@= F=H= HAFHAIA J=H L=HE LAEI GK= JEJ= CH ? I @A >=HH=I LAHJE?=EI J K A AI AEN N HA?A>A = L=HE LA A ?E=I =>I KJ=I HA =JEL=I

DEIJ CH= = 0EIJ CH= =I I AEN ?

K IA = =>HEC= =I ? =IIAI ) =HCKH= @=I ? K =I HAFHAIA J= = = AEN O HA?A>A =I BHAG ?E=


= H JE = =FHAIA J=@= J @ @A E JAHAIIA A?AII HE

F EJK@A @=I ? =IIAI




FAH?A JK=EI K @A IE@=@AI @A BHAG


JA GKA AI KJE E = @ 4 ?= ?K =H

@A =? H@ ?

AH A I E EJAI @=I ? =IIAI IACKE @ K

-IJ=J IJE?= * IE?=


6=>A = ! ! ,EIJHE>KE ?A JK= BF @ FAI @A BHAG >IAHL=@ A ?E=I =>I KJ= B= HA =JEL= BH A FAH F JE D I @A ?= A = A F

+ =IIAI "" !! "$ & "$ & "% &! "% &! "' #& "' #& # !! # !! #! & #! & #" &! #" &! #$ #& 6 J=
. JA ,=@ I ?J ?E I ,AII= .ECKH= ! " 2 @A IAH JAEI J= > = AEH= F @A IA ?

B=
# $  " '  $

BH
      &  &   

BF
      &  &     

#

 

 

IJHKEH

DEIJ CH= = HABAHA JA =

ANA F

=I BHAG F ?

?E=I =>I KJ=I =?K K =@=I F=H= ?E = J A I @A "&C 7 = J=>A = F @A JH= =>=EN K =?E =

 K =?E = @A  A F=H= >=EN  K =>=EN @A  2 @A @ E B H =H F H ANA F GK= J I F JE D I @A ?= A = A IAH ? IJHK @= F=H= @A IJH=H AII=I BHAG I @EIF IEJEL I CH ?E=I ANF E?EJ= @ IA I E EJAI ? I KI=@ I F=H= HAFHAIA J

@=I ? =IIAI A GK= J I A A A J I @= = @=GKA A L= H 6=>A = ! " =I ?D= = KJ I ? B=?E A JA ) H JE = F=H= ? IA CEL=I .ECKH= ! #

IJH= IA A ?

IJHKEH DEIJ CH= =I KI= = BK

DEIJ @ 4

A = =JHE>

= @A IE@=@A @A BHAG

?E= HA =JEL= A ? HAI @=I ? K =I F @A IAH

@E ?=@ I .ECKH= ! "=

D ?

DEIJ?= A = >HA= I ?"" !! "$ & "% &! "' #& # !! #! & F C =E  CH=OIAG    A CJD $

#$ #& BHAG .) 5- O => ,BH N => += A = A


.ECKH= ! "> = @= H JE = F=H= = .ECKH= ! "=

F E JID E@I D@A IEJO  

!  ,EIJHE>KE AI @A BHAG
0.15

?E= A IK=I HAFHAIA J= AI CH


0.15

?=I

0.10

Dfr

0.05

Dfr 0.00

44

46

48

50

52

54

56

0.00

0.05

0.10

44

46

48

50

52

54

56

Canela em p (g)

Canela em p (g)

=

> F A K = ?E=

.ECKH= ! " = 0EIJ CH= = @ FAI @A F JE D I @A ?= A = A E D= @A FH @K


50

>

AI

DEIJ CH= = ?

@A BHAG

Freqncia acumulada

10

20

30

40

44

46

48

50

52

54

56

Canela em p (g)

.ECKH= ! #

CEL=I HAFHAIA J= @

=I BHAG

?E=I =>I KJ=I =?K K =@=I 4

=?E = @A A =>=EN @A A IAK HAIFA?JEL ? @EC A

) IACKEH = H JE = KI=@= F=H= ?

IJHKEH = .ECKH= ! #

?"" !! "$ & "% &! "' #& # !! #! & #" &! #$ #&

"
6=>A = ! " .HAG .=

-IJ=J IJE?= * IE?=


?E=I =>I KJ=I =?K K =@=I =>=EN @A .= A =?E = @A

E EJA @A ? =IIA C "" !! "$ & "% &! "' #& # !! #! & #" &! #$ #&
. JA ,=@ I ?J ?E I

.=
 #   !# "" "" #

.=
# "# !' ' # $ $ 

=> =? F N =>

? # ?# "# J E =>

 !'  

 '

!# "" # $

"" $

#  ?E= =?K K =@=

O => .HAG F C

+= A = A

F E JI E =?  

!
5A =

A@E@=I @A F IE
c1 c2 A c3 ?
K J I @A @=@ I

? ? ?!

?    ?&     ?   '


)

@E=
@E= =HEJE ANA F JE?= @ I A A A J I @A K JA GKA I JH I ? LAJ H BAEJ= FA = BK = AI = K J I @A @=@ I F IIKA

A= 

!
@E=

A@E@=I @A F IE

A= ? A= ?  A= ?!

!
) ) BK

A@E= =
A@E= = @A @=@ I @AI=CHKF=@ I J= > @A B ?E >JA 4 K J I @A

A@E=  ?K FHA AIIA F=FA


AI L= H @AII=

=EI K = LA A@E@= @A F IE

I JH I ?

@=@ I =FHAIA J=

A@E= ? A@E= ?  A@E= ?!

!
,=I

@=
A@E@=I @A F IE I ? > AJ A =EI ? K I =FA =I = @= IA A ? JH= = @ > IE? I @ 4 7 = > = = JAH =JEL= F @A IAH @EI?HE E = = BHAG ?E= @A ? HH ?E= @A GKAIJ

E F A A J=@= KI=H = BK ?=@= L= H @

J=> A -II= BK

J=> A? J=> A?  J=> A?!


L= H @=@ I B H= BK =EI BHAG JA AI K IA = = @= F=H= I JH I ? =I K J I @A

L= A JA B E @EIF I @=I

AIIA ?=I

A@E@=I @A F IE

IK ?EA JAI F=H= @EBAHA ?E=H I ?

K J I @A @=@ I 2=H= ?K FHEH AII=

A@E@=I @A @EIFAHI

-IJ=J IJE?= * IE?=

!!

A@E@=I @A @EIFAHI
K J I @A @=@ I JA HAJ H = HAJ H = L= H NE IA @ELAHI=I A NE A JA?A GKA AN @= = F EJK@A

! !  ) F EJK@A
2=H= IA LAHE ?=H = = F EJK@A @A ? = AEH=I ) BK E EIJA E @A K =I BK @A K > AJ AI

H= CA F H ANA F =N A E  GKA J= >


F @A

) F=HJEH @= ?= ?K = IA = = F EJK@A )? A J= > IAH KI=@ I ? ?K

I L= HAI

> AJ

H= CA? H= CA?  =N?!

H= CA?  H= CA?  

E ?!

!!
) BK F=@H

8=HE

?E= A @AILE F=@H


GKA HAJ H = = L=HE ?E= = L=H A I@ HAJ H = @AILE F=HJA @ I F=? JAI > IE? I @ 4

) >=I B= A

L=H? L=H?  L=H?! I@? I@?  I@?!

! ! ! + A ?EA JA @A 8=HE=
A@E@= @A L=HE= @=@ A FAH?A J=CA B ?E ?= ?K KEJ KI=@= F IIKE BK *H=IE FH FHE= ? A ?EA JA @A L=HE= 4 - JHAJ= @ KEJ

I@? I@? 

A= ?  A= ?  

! " + HHA =
I@?!

E A=H
A= ?! 

! " + HHA =
-NEIJA ) BK E ?= @ELAHI=I

E A=H
A@E@=I @A ? HHA = A JHA @ EI ? K J I @A @=@ I 2A = @ J @ I @A ? ?K @A ? HHA =

? H @EIF A @A JH I
@ =HCK A J

AJD @ @AII= BK
A @= A 5FA=H =

F @A IA AI? DAH A JHA =I ? H

HA = AI @A 2A=HI

? H? ? H? ? H?

! " ?' & '  ! " ?' & '  ! " ?' & ' 

AJD @ FA=HI AJD @  A @=

 

AJD @ IFA=H = 

! # 1 JAHL= I @A ?
) F FH F H AI GK= GKAH @= 4 =? IJHK

=  A p
= = F=H= @E=I A L= H 2=HJE?K =H A JA F=H= = JAIJA J F=H= K = = @A '# @A ?

=EI IACKH= F=H= IA B= AH E JAHL= I @A ? F=II = F=II ?D= =@= J JAIJ GKA B= K

@E= ANEIJA K = BK

@E= A =E @= HAJ H = IAK E JAHL=

=

?  " K

 $

 %  

 ""

 & 

"  '

J JAIJ=

A= =

A 5= F A J JAIJ @=J= = J  @B % F L= KA A=  EI J AGK= J  '&%#

= JAH =JELA DOF JDAIEI JHKA '# FAH?A J ? BE@A ?A E JAHL=  '" !!'  #$%!!' I= F A AIJE =JAI A= B N  '&%#
IJHK

) =GKE ?D= =@= ?

F=II = F=II

=@=

=EI

GKA = KJE E =

&
@= JHE>KE @E= FH F H @AILE F=@H A J= = D = @E= K

-IJ=J IJE?= * IE?=


IJH=EI A GK= JEI @= @EI GK= JE @= @EIJHE>KE

=EI FAHJE A JA

?=I @=

F @A IAH FA@E@ = JAI A =H = A =@ A

> AJ GJ ,AF EI @A E JAHAIIA

I ?= ?K

=H I E EJAI E BAHE H A IKFAHE H @ E JAHL=

GJ 1 5 1  

GJ '%# @B  A CJD=  A@E= A@E= A@E= A= = GJ I@= IGHJ A CJD= A= = GJ I@= IGHJ A CJD= 5 A@E=

 '" !!'  #$%!!'


= AIJE = ANA F == ? IJH= @= FH F H F @A IA KI=H K GK= JE @= @EI FA AI

2 H IK= LA JHE>KE FHE ? FE A +

H = AA

IACKE@= ?= ?K =H I E EJAI @ E JAHL= IE@AHA = FH F H >IAHL= IA 6 A

@A L= HAI @A a1 GKA I

HAI GKA AH

K IA = 75%

G 1 F 5 F 1 F  

H  '%#  %# G  %# G 5 F IGHJ %#  IGHJ %#  # A CJD= # A CJD=

 ""''"!  ##%

! $ 6AIJAI @A DEF JAIAI IE F AI  A p


JAIJA @A DEF JAIAI F=H= = B E A ?E =@ JA @E= >=IA=@ = @EIJHE>KE J @A 5JK@A J @E @E= E?= - A ECK= = = JAHE H ) BK @E=
E JAHL=

J JAIJ

>A

FAH EJA JAIJ=H = ECK= @=@A A JHA @K=I = AH @AB=K J 


- > H=

IJH=I JAIJ=H IA =

K JAIJ=H IA =
B= = IA JE@ K

ECK= = K
@A ? =

L= H GK= GKAH 2=H= EII


= F=H= FH F H AI A = = GKA E KEJ IJH= KI=@=

EJA IKFAHE H K JH=F=IIA  FAGKA = HAIK J= @ A

A >HA IA GKA

AIIA ANA F

K = >=EN= FAHB H = ?A @ AIJE =@ H

! $ 6AIJAI @A DEF JAIAI IE F AI  A p


>=IJ= @E ?=H =HCK A J

'
JA = JAHE H I D= HAI

K ?
ANEIJA K

IA BA

3K= J ? F=H =?

FH F H K

JAIJA IA A D= JA E F A A J=@ @= @EIJHE>KE H = 5KF @A L= HAI A

F=? JAI > IE? I - JHAJ= J

KEJ B ?E ?= ?K =H = AIJ=J JE?= @A JAIJA A ?E= IA = FH F H IACKA

GK= JE F H ANA F K

GKA @AIA A IA JAIJ=H = # @A IEC E ? GKA AH % JH= E@= FA = =

JAIJA z = GK= JE@=@A GKA HAIK A = E B H =

IJH= F @A IAH ?= ?K =@= ?

 %#  % IGHJ %#  #  G 
+

A CJD=

 ! $#'&$ H  '#  $""&#"


J= HAIK J=@ IA HA AEJ= H0

!

-IJ=J IJE?= * IE?=

+=F JK

"

-IJ=J IJE?= -NFAHE A J=


) @A =E H F=HJA @ I F = A = A J I ANFAHE A J=EI AIJ =II ?E=@= = K E A=H >=IA=@ @A AIIA FHE ? FE GKA E A=H @A K 4 JH=J= AIIA JEF @A = @AIJ= B H = K 2 H EII = BK EIA D=H GKA EIA @A L=HE ?E= =?=>= IA @ ANFAHE A J

@A ANFAHE A J I ) = F=HJE?K =H I >HA = KIJ= @A I E A=H



= FHE ?EF= BK

= IAH KI=@= A

) )8)I

"  ,A E A= A J 1 JAEH= A JA +=IK= E =@


-II= IAII F = A =@ I A -NA F F IA @AIJE =  -NJH= @ @ = EIAI @A ANFAHE A J I @A ABAEJ I IE F AI A=@ A +KH I A @E=I A M '&! AIIA ANA JH I B= A @=I ? @ K > AJ ,A E A= A J 1 JAEH= A JA +=IK= E =@ ,1+ ELH @A J

JH=J= @ JA F @A A C H@= @A IK

A .= = = AEJKH= @ =HGKEL GKA ?

I @=@ I A =H = A A A

IKE IKE

HA=@ J=> AAN H D 647-

B= A @= @E=I  ! " # $ ? # ?  ? ? '' '%

? " ? %

!
% & '    ! " # $ % & '   !
? A ? IJHK @

-IJ=J IJE?= -NFAHE A J=


@ % @ & @ " @ @ @ @ @ A A A A A A A A A   ! # &  %  ! ! # '&  #
I FAH EJA GKA IA LEIK= E A
GKA AIJ =? JA?A @

= @ F JIKE

?=@= B= A @= 2=H= ?=@= K = @A =I K

> NF J F=H= = L=HE LA @E=I

F
7 K

JIKE
?


KEJ = @ JE =FA =I A DA?AH ? = EIAI @A L=HE ?E=

= @

=J
A JA

J=?D -IIA ?

GKA HA?A>A ?

=HCK A J K

> AJ 4 CAH=

@=J= BH= A F=II= = HA?

> AJ I =I ? K =I @AIIA > AJ

=JJ=?DIKE


HA? DA?E@ I ? > AJ I

)C H= B= A @= A @E=I I

B= A @=  ? ? ? ? ? ? @ @ @ @ @ @ @ @ A A A A A A A A A

"  ,A E A= A J 1 JAEH= A JA +=IK= E =@


115

!!

dias

100

105

110

d fazenda

.ECKH= "  1 LAIJEC= B= A @=I

LEIK= @ JA F @A A C H@= @A IK

=I JH I

ALA I

? @ A
F=II B=J H ?HE=H K > AJ @A JH=J= A J B= A @= IA =

FH NE ? IE@AH=@ K

B=
K

B=?J HB= A @=


IACKE@= K @A E A=H = KIJ=@ @E= CAH= @A 5A = @A IACKE JA E A=H @A @A

,1+ yij = + f azi + eij ) I K JAH ? K

FHA?EI= IAH E B H =@= I HAI @K I = KIJA @ E A=H F H EII

F EI IK>A JA @A IA GKA A = B= B= F=HJA @A J @ J= > @A =J @ IA @ ? IACKA

IKE
-

@E=I B= 
IACKE@= GK=@H @A = EIA @A L=HE ?E= F @A IAH FA@E@ FA = BK @A E A=H

L= GKA HA?A>A ?

=HCK A J

= KIJA @

L=IKE

!"
) = OIEI 4AIF B= 4AIE@K= I 5EC EB IA B 8=HE= ?A 6=> A @E=I ,B 5K #  # "   
I

-IJ=J IJE?= -NFAHE A J=

5G

A= $

5G . L= KA 2H . % $        #      
IAH ? = @ IE@AH=@ I ECK=EI

'"  %#

? @AI

   

AIJA ANA F A D =EI F

LAEI @ B=J H B= A @= F @A =I ANEIJA @A 2A ? = KIJA @

GKA E LAIJEC=H A JAI @

KEJ=I KJH=I E B H = AI

> AJ GKA =>HEC= LAH J @ I I ? A AI =I I HAI @K I I

= AI
?

F II LA

> AJ IKE 8= A E LAIJEC=H IJH=@ I =GKE ? ANA F

JA @ @A J @ I

= AIIKE  ? ABBE?EA JI HAIE@K= I ABBA?JI H=  BEJJA@ L= KAI $  =IIEC  GH @B HAIE@K=  ? JH=IJI N ALA I ?= JAH I  IKEHAIE@K= I   A  & A  $  $  % $$$$$%A  " !!!!!!A  %  % ! A   A  # A  ! A   !!!!!!A  # $$$$$%A  ! # A  & A  !  A  & % !!!!!!A  ! $ $$$$$%A  " ' " A  ' #  # # $$$$$%A   % A   "!'!#A " A  $ A  @A  

$$$$$%A  ' !!!!!!A 

"

,A E A= A J A

* ? I +=IK= E =@ I

!#

"

,A E A= A J A
* ? II K B H = @A ?

* ? I +=IK= E =@ I
JH A ?= K = HAIJHE IE F EIJ= A E ? EIA @A L=HE ?E= > ? I = = A=J HE= F AJ= E IAHEH =EI

.= AH > ? I IEC E ?= I > K = LEI K =B JA @A L=HE= @A ?=IK= E =@ I -NA F L I +KH AH GK=@H @A = AIJ=J IJE? @A K 7 AIJK@ B E A

ANFAHE A J @A ABAEJ IE F AI A J=@ F=H= E LAIJEC=H = E EK E = ,*+ ? ? JH A K

yij = + trati + blocoj + eij


?E= @A @ EI = F IJKH= @A = >EA JA IA J=@ A

JEF I @A E K E = M '&!

ANFAHE A J B E

GK=JH HAFAJE AI  A=@ A = @ I B=H =I = AI @A AJ I ?HE=H I E A=H A FA@EH @A

) ANA F =HGKEL

@ ,1+ = FH NE = IAG F J=H ANFAHE A J ?E= > ? I A EK E =

?E= @A ? = KIJ=H

= AN=H =I ? K =I ?

B=J HAI @A L=HE= GK=@H @A =

EIA @A L=HE

L L >  ! " # $ % & '    F

HA=@ J=> AAN H D 647- ? E K E =?=    L I  !! A !% B !#'  && A !" B !!% ! ! ! " " " J L   '# A !"! B !%!  !! A !" B !

=JJ=?D L 

!$
1.0 1.5 2.0 2.5 3.0

-IJ=J IJE?= -NFAHE A J=

bloco

2.5

3.0

iluminacao

1.0

1.5

2.0

ovos
300
1.0 1.5 2.0 2.5 3.0 3.5 4.0 300 320 340 360

.ECKH= " @A E K E =

1 LAIJEC= A FH @K

LEIK= @ ANFAHE A J A @A L I

,*+ ?

JH=J > F F

B=?J HE K E =?=  B=?J H> ?  L I ?  O => 2H @K?= @A L I
KEJ I B= = @ = JH= I

JJH=J L I N => 1 K E =?=  O => 2H @K?= @A J> L I N => *

) .ECKH= " J HAI 2 H EII B H =@ I A

F @A IAH @A @EB ?E E JAHFHAJ= K > NF J F @A IAH B=?E I> ? IA?

GK= @ IA JA IJHK @ HA =?E

A JA ?

L=HE LA HAIF IJ= ?

I JH=J= A J I  AIIA ?=I

B=J HAI .ECKH= " !

L = L= L ) = OIEI 4AIF IA

 L I > 

JH=J

B 8=HE= ?A 6=> A L I

320

340

360

1.0

1.5

2.0

2.5

3.0

3.5

4.0

> ? I JEF

"

,A E A= A J A

* ? I +=IK= E =@ I

!%

360

340

Producao de ovos

Producao de ovos

320

300

300

320

340

360

e Iluminacao

2 Bloco

= .ECKH= " ! = -NF H=J HE= @= FH @K A > I @EBAHA JAI > ? I

> @A L I =I @EBAHA JAI E K E = AI

,B 5K > JH=J 4AIE@K= I $ 5EC EB


+ I

5G #

A= 5G . L= KA 2H . %%$ & $ !&$ '    


JA @A L=HE=

!! ! "  !  #  

%# 

""$

# ""!%  ""&#

? @AI

      #      
JH=J= A J I B E IEC E ?=JEL= =I A JHA @= @EBAHA FH = E = IEC E ?=JEL=

JAIJA . F=H= = B JAIJA @A @ I

FHK@A JA HA= E =H K LAEI @A E K E = =I @ JAIJA @A 6K AO K @EB ?E 2 H J= 6K AO A A FA = BK @A BK AI @= @EIJHE>KE ) BK

@E=I F=H= LAHE ?=H GK=EI =I @EBAHA

) @AJAH E = F IIKE BK

=EI F FK =HAI

AE ?EA J ? >H=IE AEH J= 3K= JEI A FH >=>E E@=@AI

J= >

AIJK@A JE =@= F @A K = = JAH =JEL= F @A IAH

IAH FA@E@ I FA = BK

6K AO

=EI E B H =JEL= A @A B ?E E JAHFHA AIJ= IEC E ?=JEL= @A @E=I @K=I = @K=I = KIJA @A @A >E = F=FA @= ? =I A JHA > AJ ? AI

6K AO05, ?= ?K = = @EBAHA = D
IACKE@= J @=I =I @EBAHA K

FHE AEH =HCK A J @AII= BK

JA @ K

= L ) BK  A = L=

= L IA FHAIJ= =

IACK @ =HCK A J @= BK

6K AO05,

!&
FA@A = @AIEC = ?A JA @A IK=I IAH LA @A ?

-IJ=J IJE?= -NFAHE A J=


@ B=J H GKA @ALA IAH IK> AJE@ = JAIJA @A LAEI @ALA IAH H@A =@ I A @E=I = JAI @ JAIJA = =A GKA @E=I H@A ?HAI

JAH?AEH =HCK A J LAHE ?= IA I

GK=HJ =HCK A J HA?A>A GK= @ALA

JAIJA @ALA IA >=IA=H

= L L I >

JH=J H@AHA@ 647A= I ALA ? B ALA  '# I B

6K AO05, L 6K AO K JEF A ?

ME?D JH=J F=HEI BE@A ?A

'# B= E O MEIA ?

B=?J H ALA I D=LA >AA .EJ JH=J @EBB B  !$ A  " A B $


) LAHI

H@AHA@ > JH=J

= LB H K =

L I

MH $ " $""  %$"" !$ " $""


CH

KFH

F =@

# # #

%& ' $"  &'%% &# %$"  #%&%" "& ' $"  &'$#%'
=EI B ?E E JAHFHAJ=

?= @AIIA HAIK J=@ F @A IAH

J6K AO05, L

ME?D JH=J H@AHA@ 647- ?


@AJA?J K @EBAHA =EK E =

B ALA  '#

8= A @K

J=H GKA AIIA JAIJA - JHAJ= J

= IEC E ?=JEL= A JHA I =E H FH = A JHA AII=I ) BK

LAEI @A E K E = @E=I

A F=HA?A CAH=H AIJ= @ = @EBAHA

@A L I GKA = =KI E E=H @= , 5 KJH JAIJA @A

?E= @A E K E =

@E=I GKA F @A IAH HA= E =@ JEF I JAIJAI A JHA I =E @= =FHAIA J= K F=H= JAIJAI I @A FH JA

JAIJA J

F=EHMEIA J JAIJ B=
IAKI F L= HAI -II= BK AI? D= @A @A * L=HE BAHH ?E= ? A?= EI E >E =@=

LAEI @A B=J HAI A HAJ H = =HCK A J GKA FAH EJA = JEF I ? = FH JA KI @=

JAH?AEH =HCK A J =E @= D=>E EJ= K @AI=>E EJ=

F=EHMEIA J JAIJ L I JH=J

"

,A E A= A J A

* ? I +=IK= E =@ I
95% familywise confidence level

!'

ef
40

e0

f0

20

20

40

60

80

Differences in mean levels of trat

.ECKH= " " 6AIJA @= @EBAHA @ I = @EIJHE>KE

= A JHA

@E=I @ I

LAEI @A E K E =

>=IA=

AIJK@A JE =@=

2=EHMEIA ? @=J=  A  & B    % 2 L= KA =@ KIJ A J

F=HEI

I KIE C J JAIJI MEJD F

A@ 5,

L I = @ JH=J A

AJD @

D > B A@ 5,

F=EHMEIA J JAIJ L I JH=J F =@ 2=EHMEIA ? @=J= F=HEI

I KIE C J JAIJI MEJD F

L I = @ JH=J

"
 A  & B  #   2 L= KA =@ KIJ A J
=EI K = LA JA? ,K ?= I @A @EBAHA 5 AJ?

-IJ=J IJE?= -NFAHE A J=


A

AJD @

> BAHH E
? ? H@ K ? @E=I ? JAIJA . = @A 5? JJ JJ =I

AIIA JAIJA J= > =I A JHA =I F=H= I A ? ) @E=I @ I JH=@ I A @EII

LAEI @A E K E = BK =? AI @ I F=? JAI > IE? I F=? JA ?D= =@ JEF =I @A F F=? JA K J? F=H= AI F=? JA

KJH I JAIJAI @A ? @A B ?E E F A A J=

JEF =I @A ANEIJA K

KJ

?
@E=I

F GKA F IIKE BK


? = @ K J? F ANECA

AI GKA IA @AIJE =

E>H=HO K J?
F=? JA

F ?=HHAC= H
= = 5AKI ?

LJ

AIIA F=? JA = BK JH=IJAI F @A JAIJA @A ,K

IE E J CAH=
>=IA=H IA A AJ ? E KI

IE K J @ELAHI I =H?KI JH=

A I E JAHL= I @A ? J @ I ,K ?,AH

AJJ 6K AO 5AGKA

)8- +D= CAF E J 9E E= I

JJ A 6AJH=@A )GKE KI= IA

E>H=HO K J? @K @K

F JH=J MDE?DB JH=J JOFA ,K BE@A ?A E JAHL= I ,K AJJ ? AJJ JH=IJI

IE E J L I > 5E K J= A KI ?

+= IE E J B H K =B H K = '#  ? L I > JH=J MDE?DB JH=J JOFA ,K AJJ

BE@A ?A E JAHL= I #  '% #  $& & !& ! #$& %$ $&

-IJE =JA JH=JA JH=J JH=JB JH=J F J@K  " !$ # #

"

,A E A= A J A

* ? I +=IK= E =@ I
Dunnett contrasts

"

tratetrat0

tratftrat0

( 0 20 40 60

) 80

95 % twosided confidence intervals

.ECKH= " # + JA GKA @A =? H@ ? ?E= = E K E = A FH @K

JH=IJAI >=IA=@ I

JAIJA @A ,K

AJ

JAIJA >E =JAH= @A ,K =E H FH @K

AJ = # @A IEC E ? ?E= @A E K E =

GKA = =KI

"

-IJ=J IJE?= -NFAHE A J=

" ! - I=E I A
+ IE@AHA I ? IE F AI ? J=@ A ?=IK= E =@ F=H= = E JAH= -NA F F

AIGKA = .=J HE=


ANA F @E@ JE? ?=I @A K AIGKA = B=J HE= EIA IA J H =

=FA =I @ EI B=J HAI f 1 A f 2 5A AIIA ANFAHE A J JELAH IE@ > ? I ?=IK= E =@ I b 7 @A @ @A IA B= AH = = J=@ A @A E A= A J E JAEH= A JA GKA f 1f 2jk = J=

=EI =>H= CA JA GKA IA JELAIIA IE@

AIJ=J IJE? F=H= @AI?HALAH ANFAHE A J I @AIIA JEF

yijk = + bi + f 1j + f 2k + f 1f 2jk + eijk A JHA I @ EI B=J HAI AIJK@=@ I ! 7

ANFAHE A J B E BAEJ F=H= =L= E=H = ? H @A @ ?AI @A =H?=I -IIAI B H= ? FH=@ I A @ EI GK=JH HAFAJE AI

AEJA LA @E@ I = CH= A @A JH I J I @A LA @= A

@ ?A > FL @ ?A IK > FL FL

HA=@ J=> AAN! H D 6 B=?J H> ? 

=JJ=?D@ ?A B=?J H =H?= B=?J HFJ LA @ = L? H =HO@ ?A  5G A= 5G . L= KA  $%  '  $  " %!$& ! #  $%       #       
= @ = L? H > F AJ = L? H > FL @AIA FA D= FL FL 1II

>

FL

FL 2H .  "#""&  "#'  '#"

,B 5K

! ! # %'   $  %  # ' 

!' # ! &" " #!"A $ %$!

4AIE@K= I 5EC EB

? @AI  

   
?

E F HJ= JA E B H =H GKA AI =? JEC= F=FA GKA ? = @ ?

JA?A F HGKA K = LA @AJAH E =@= = E JAH= @ I ABAEJ I IE F AI @ I B=J HAI JA D= IE@ ? - > H= = E JAH=

IA J H = ? =H= = E LAI I

IE@AH=@= IEC E ?=JEL= = # F=H= =I

@E@ JE? I A = IAH E LAIJEC=@= ) JAI @EII F H

@E=I @ I B=J HAI

" ! - I=E I A

AIGKA = .=J HE=


1.0 1.2 1.4 1.6 1.8 2.0 4 6 8 10

"!
12

marca

1.0 1.2 1.4 1.6 1.8 2.0

pt.vend

bloco
1.0 8 10 12 2.0

cor

1.0

1.5

2.0

2.5

3.0

1.0

2.0

3.0

4.0

.ECKH= " $ -IJ=J IJE?= ANF H=J HE= @ I ? B=J HE= A I > ? I ? = @

K J @A @=@ I @ ANFAHE A J

ANF H=@=I FA

@A J=> AI A = AIJ=J IJE?= ANF H=J HE= @=I E JAH=?JE F J

E JAH= AI

BAEJ= FA = BK

@ ?A @ ?A 6=> AI /H= @ % %# A=

@ @

@A

J=> AI@ ?A

JO  A= I

B A= I

3.0

4.0

1.0

1.5

2.0

2.5

3.0

""

-IJ=J IJE?= -NFAHE A J=

>  ! " & !!! % &!! % !!! % #

 & # # FL  % # & FL FL   & %# " # & $ #

! # ' #

# # # F F J =H?= FJ LA @ ? H JFJ LA @ =H?= ? H


JA D= IE@ ? F =I = =H?=  JA IE@AH=@= IEC E ?=JEL= A D H F=H= AD H = JE@ IK= ? H

! & %#  E JAH=?JE E JAH=?JE

JA GKA A > H= = E JAH= FA FA JAIJA . = .ECKH= " % IKCAHA GKA A! F J @A LA @=  = JAH = ? H @ ?AI @A AEJA

J @A LA @=

" ! - I=E I A

AIGKA = .=J HE=

"#

10

pt.vend 2 1

mean of cor

2 marca

.ECKH= " % 1 LAIJEC=

@= E JAH=

J @A LA @= N

=H?=

,AI@ >H= @

=H?= @A JH @A ?=@= @A LA @=
D ? = @ I H FE@ I A FH

LA @A 2

@AI@ >H= A J @=I E JAH= AI =E @= K = F=HJA JH=>= D I= A @A E?=@= @= = ? EIA F EI GK=@H @A = ?=@= ? LA @A 2 J I F=H= J= FHA?EI IJHKEH ?=@= AJ=F= @AJ= D=@= A JA EIA @A L=HE ?E= @ @AI@ >H= A J @A LAEI @A 2 =H?=I @A JH @A @= I = J @A LA @= F @A IAH BAEJ FA = ? HHAJ= F=HJE A JHA I

@A GK=@H=@ I @A E JAH= IACKE@ FA = BK GKA GKAH @E AH 

J @A LA @= 1II F @A IAH @ECEJ= IA pv/m =HCK A J

= L

@A

KC=H @= E JAH=

@A JH @A FL )IIE

F II LA FA@EH FA

IF EJ @= BK

IK

=HO AII= ? HHAJ= F=HJE

@AI IK >

= L? H ,B 5K

> 5G A=

FL

 EIJFL ? ! FL ? 2H .  "#""%& "

=HO@AI IF EJ ! ! #

EIJFL 

5G . L= KA

 $%  ' 

"$

-IJ=J IJE?= -NFAHE A J=

10

marca 3 1 2

mean of cor

1 pt.vend

.ECKH= " & 1 LAIJEC=

@= E JAH=

=H?= N F

J @A LA @=

FL FL FL FL FL FL

$  #"  ! 

$  " %!$&

 "#'

" &$ 

 # $ '%!%  '!A # %   !#& "  &A # $   $!$  $%       #       


? JAH ? =H?=I GKA IA @EBAHA ?E= =I = @ =EI A => H=@

 $&

4AIE@K= I

# '   

5EC EB ? @AI
) > IF GK= J = ? H

   
IJH=

J I @A LA @=  A 2 H EII J @A LA @=

IAH BAEJ K

JAIJA @A 6K AO F=H= @EBAHA ?E

@A JH @A ?=@= F

JA GKA K

BAEJ F=H= IAF=H=H =FA =I I @=@ I @A E JAHAIIA

@AI FL B HE E @AI FL 

K AHE? " EB@ ?A E ? ? H  @AI FL H>E @@AI FL @ ?A E 

=H?= FJ LA @ >

" ! - I=E I A
 ! " '    % & '  FL FL > F ! ! ! !    

AIGKA = .=J HE=


            ! " ! " ! "   &  & ' # ! # " & & '   !  FL > MDE?DB FL

"%

 

B=?J H@AI FL B=?J H@AI FL

JIE E J@AI FL

" FL

 JOFA 6K AO

Tukey contrasts
pv1.m2pv1.m1 ( )

pv1.m3pv1.m1

pv1.m3pv1.m2 5 0

( 5

95 % twosided confidence intervals

.ECKH= " ' 6AIJA @A 6K AO F=H= @EBAHA ?E=H =I 

=H?=I

J @A LA @=

"&
JA GKA =I HAIA J= =E HAI .ECKH= " ' =H?=I  A ! F @A IAH ?

-IJ=J IJE?= -NFAHE A J=


IE@AH=@=I ECK=EI A = >=I =F =H?= F J @A LA @= 

@E=I @A ? H @ GKA =

@AI FL B HE E @AI FL 

K AHE? " EB@ ?A E ?  ! "  ! " ? H %  & & & $ $ #  ! B=?J H@AI FL '   !  "
=

 @AI FL

H>E @@AI FL @ ?A E

=H?= FJ LA @ > # $ % & ! " # $  ! " FL FL F > ! ! ! !    

 

"  B=?J H@AI FL

JIE E J@AI FL
F J @A LA @= @E=

FL

FL

> MDE?DB FL

 JOFA 6K AO

=H?= JH I IA =H?=

IJH= AIJ=JEIJE?= A JA ECK= .ECKH= " 

=H?=  A ?

=E H GKA =

" ! - I=E I A

AIGKA = .=J HE=


Tukey contrasts

"'

pv2.m2pv2.m1

pv2.m3pv2.m1

pv2.m3pv2.m2 4 2 0

( 2 4 6

95 % twosided confidence intervals

.ECKH= "  6AIJA 6K AO F=H= @EBAHA ?E=H =I

=H?=I

J @A LA @=

,AI@ >H= @ 2

J @A LA @= @A JH @A ?=@= @A =H?=
F IE?E = A J @ I B=J HAI   A FL

LA

I FH ?A@E A J I F=H= AIIA @AI@ >H= A J I IA =I E LAHI AI BAEJ=I

IA A D= JAI 4AII= J=

@AI IK > FL FL FL FL ! 4AIE@K= I 

= L? H =HO@AI IF EJ ,B 5K

> 5G A=

FL EIJFL  EIJ  ? 2H .  "#""%&  ""%#  #!' %   !&&  %&'& ?  ! ?! 5G . L= KA

! ! # %'  ! !    #  &   " # # '   

 $%  '  " !!! ! " 

!' # ! &" " #!"A $  #  !'"% &  $ !#& " # ! ## $  $%

5EC EB ? @AI

          #       

#

-IJ=J IJE?= -NFAHE A J=

AIIA @AI@ >H= A J @E=I I @ EI F F=H= AII= B JA @A L=HE=

=FA =I =

=H?=

IA

IJH= ?

@EBAHA JAI

J I @A LA @= F H EII

B= IA K

JAIJA @A 6K AO =FA =I

@AI B HE E @AI 

K AHE? " EB@ ?A E  ?  ! "  ! " FL > B=?J H@AI B=?J H@AI "
J @A LA @=

 @AI

H>E @@AI

@ ?A E 

=H?= FJ LA @ > '    ! " # $    

? H # ! # " & $ $ #  !  FL > MDE?DB  FL JOFA 6K AO


=H?=

JIE E J@AI
F

+ =H= A JA =FHAIA JA =E H

FAH EJA GKA

@ ?A @A AEJA @=

@E= @= L=HE LA ? H .ECKH= " 

" ! - I=E I A

AIGKA = .=J HE=

#

Tukey contrasts

m2.pv2m2.pv1

95 % twosided confidence intervals

.ECKH= "  6AIJA 6K AO F=H= @EBAHA ?E=H = LA @=

=H?=

I @ EI F

J I @A

-IJ=J IJE?= -NFAHE A J=

Congresso da APG
Minicurso: Introduo ao R
Parte 2

00.1-

Introduo Referncias Nenadic, O., Zucchini, W., Statistical Analysis with R http://www.statoek.wiso.uni-goettingen.de/mitarbeiter/nenadic.html Faraway, Julian J., Practical Regression and Anova using R http://www.maths.bath.ac.uk/~jjf23/book/ Ribeiro Jr., Paulo Justiniano, Curso sobre o programa computacional R http://leg.ufpr.br/Rpira/Rpira/

0.2-

Mudando o diretrio de trabalho

rm(list=ls()) setwd("C:\\Documents and Settings\\...\\Congresso APG\\Rotinas em R") getwd()

11.1-

Distribuies de Probabilidade Introduo Dada uma varivel aleatria X, existem duas funes relevantes associadas: Caso X seja contnua, a distribuio de probabilidade acumulada,
FX ( x ) , e a

funo densidade de probabilidade, f X ( x ) .


FX ( x ) = P [ X x ]

fX ( x) =

d FX ( x ) dx

FX ( x ) =

f X ( u ) du

f X ( u ) du = 1

Exemplo 1:

X ~ exp(2)

f X ( x ) = 2e 2 x , x > 0

FX ( x ) = 1 e 2 x

2 . 0

1 . 5

1 . 0

0 . 5

0 . 0

0.0

1.0 x

2.0

3.0

0 . 0 0.0

0 . 2

0 . 4

0 . 6

0 . 8

1 . 0

1.0 x

2.0

3.0

Caso X seja discreta, a distribuio de probabilidade acumulada, funo de probabilidade, f X x j , em que x j { x1 , x2 ,..., xn } .

FX x j , e a

( )

( )

FX x j = P X xj
FX x j = Exemplo 2:

( )

fX xj = P X = xj

( )
xn

( ) f (u ) u=x
X

xj

u = x1

f X (u ) = 1

1 X ~ binomial (10, ) 2
X {0,1, 2,...,10}

10 1 1 f X ( k ) = P [ X = k ] = 1 k 2 2 50 1 FX ( k ) = P [ X k ] = j =0 j 2
k

10 k

10 1 = k 2

10

50

0 .2 5

0 .2 0

0 .1 5

0 .1 0

F x 0 .0 5 0 .0 0 0 2 4 x 6 8 10 0 .0 0 0 .2 0 .4

fx

0 .6

0 .8

1 .0

4 x

10

As funes disponveis no R para distribuies de probabilidades compreendem duas partes: a) Um prefixo (primeira letra) determina a ao tomada pela funo d densidade de probabilidade p probabilidade acumulada q quantil r amostra aleatria b) Um sufixo (restante do nome) identifica a distribuio

Distribuio Normal Exponencial Log-normal Logstica Geomtrica Poisson

Funo R norm exp lnorm logis geo pois

Distribuio t F Beta Weibull Binomial Binomial Ne

Funo R t f beta weibull binom nbinom

Distribuio Chi-quadr Uniforme Gama Cauchy Hypergeo

Funo R chisq unif gamma cauchy hyper

Exemplos:

Amostra de tamanho 10 de uma distribuio normal padro

> rnorm(10) [1] -0.1940739 1.3084103 -0.5032871 -1.1976513 -1.6180376 -1.2097209 [7] -0.8758033 -0.5817017 0.2427872 -1.4026841

Amostra de tamanho 10 de uma normal N(5,4)

> rnorm(10, 5, 2) [1] 4.214025 6.426099 3.844926 6.324220 8.446865 5.357674 5.170518 5.706036 [9] 1.291295 5.859870

Densidade normal padro em X=0

> dnorm(0) [1] 0.3989423

Normal padro acumulada at X=0

> pnorm(0) [1] 0.5

Quantil de 95% da normal padro

> qnorm(0.95) [1] 1.644854

1.2-

Comparao entre a Binomial e a normal Se X tem distribuio binomial de parmetros (n,p) e


n 30 ento X tem

distribuio aproximadamente Normal de parmetros = n p e 2 = n p (1 p ) . Vamos verificar essa afirmao graficamente para n = 30 e p = 1 2 .

n = 30 p = 1/2 x = 0:n fx = dbinom(x,n,p) xx = seq(0,n,0.1) nx = dnorm(xx,n*p,sqrt(n*p*(1-p))) plot(x,fx,type="h") lines(xx,nx,type="l",col="blue")

fx 0.00 0 0.05

0.10

0.15

10

15 x

20

25

30

A comparao no to boa se p
p = 0.05 .

muito pequeno ou muito grande.

Seja

n = 30 p = 0.05 x = 0:n fx = dbinom(x,n,p) xx = seq(0,7,0.1) nx = dnorm(xx,n*p,sqrt(n*p*(1-p))) plot(x[1:8],fx[1:8],type="h") lines(xx,nx,type="l",col="blue")

fx [1 :8 ]

0 .0 0

0 .0 5

0 .1 0

0 .1 5

0 .2 0

0 .2 5

0 .3 0

0 .3 5

3 x[1:8]

1.3-

Teorema Central do Limite Se X 1 , X 2 ,..., X n so cpias independentes de uma mesma varivel aleatria X de

media e varincia 2 , ento


Xn = 2 1 n X j ~ Normal , n j =1 n

Vamos comprovar graficamente. Gerar amostras da U ( 0, 2 ) , Exp (1) , Gama ( 2, 2 ) e Cauchy (1,1) e plotar os histogramas de X n :
na = 10000 # n = 100 # u = vector("numeric",na) # e = u # g = u # c = u # for (i in 1:na){ u[i] = mean(runif(n,0,2)) e[i] = mean(rexp(n)) g[i] = mean(rgamma(n,2,2)) c[i] = mean(rcauchy(n,1,1)) } par(mfrow=c(1,2)) x = seq(-2,4,0.1) yu = dunif(x,0,2) nmero de amostras tamanho de cada amostra mdias das amostras da uniforme mdias das amostras da exponencial mdias das amostras da gama mdias das amostras da cauchy

ye = dexp(x) yg = dgamma(x,2,2) yc = dcauchy(x,1,1) plot(x,yu,type="l",main="Uniforme(0,2)") hist(u,main="Mdia da Uniforme(0,2)") plot(x,ye,type="l",main="Exponencial(1)") hist(e,main="Mdia da Exponencial(1)") plot(x,yg,type="l",main="Gama(2,2)") hist(g,main="Mdia da Gama(2,2)") plot(x,yc,type="l",main="Cauchy(1,1)") hist(c,main="Mdia da Cauchy(1,1)")
Uniforme(0,2)
0 . 5

M dia da Uniforme(0,2)
3 0 0 0

0 . 1

0 . 0

-2

1 x

5 0 0

1 0 0 0 1 5 0 0 2 0 0 0 2 5 0 0

0 . 3

0 . 4

0 . 2

F r e q u e n c y

y u

0.8

1.0 u

1.2

Exponencial(1)
1 .0

Mdia da Exponencial(1)

0 .6

F r e q u e n c y

0 .4

0 .0

0 .2

-2

1 x

0 0.6

5 0 0

1 0 0 0

y e

1 5 0 0

0 .8

0.8

1.0 e

1.2

1.4

Gama(2,2)
2 5 0 0 0 . 6 F r e q u e n c y y g 0 . 4 0 . 2 0 . 0 -2 0 1 x 2 3 4 0 5 0 0 1 0 0 0 1 5 0 0 2 0 0 0

M dia da Gama(2,2)

0.8

1.0 g

1.2

Cauchy(1,1)
0 . 3 0

M dia da Cauchy(1,1)

0 . 2 0

0 . 2 5

F r e q u e n c y

y c

0 . 1 5

0 . 0 5

0 . 1 0

-2

1 x

0 0

2 0 0 0

4 0 0 0

6 0 0 0

e+00

4 c

e+05

> max(c) [1] 621394.2

Reamostrando a Cauchy e abandonando amostras cuja mdia tenha valor absoluto maior que 10:

i = 1 while(i<(na+1)){ c[i] = mean(rcauchy(n,1,1)) if (abs(c[i])<10) i = i+1 } plot(x,yc,type="l",main="Cauchy(1,1)") hist(c,main="Mdia da Cauchy(1,1)")


Cauchy(1,1)
0 . 3 0

M dia da Cauchy(1,1)

0 . 2 5

0 . 2 0

F r e q u e n c y

y c

0 . 1 5

0 . 1 0

0 . 0 5

-2

1 x

0 -10

5 0 0

1 0 0 0

1 5 0 0

2 0 0 0

2 5 0 0

-5

0 c

10

1.4

Criando funes no R A mdia geomtrica (geo.mean)

G = n x1 x2 ...xn
n n = xi i =1
= exp
1

1 n log ( xi ) n i =1

geo.mean = function(x){ n = length(x) gm = exp(mean(log(x))) return(gm) } x = c(1,2,4,1,1,8) y = geo.mean(x) y x = runif(10) (y = geo.mean(x))

A sada de uma funo pode ser um objeto do R:


lixo = function(x){ n = length(x) y = matrix(x,n,n) return(y) } x = 1:5 (z = lixo(x))

[,1] [,2] [,3] [,4] [,5] [1,] 1 1 1 1 1 [2,] 2 2 2 2 2 [3,] 3 3 3 3 3 [4,] 4 4 4 4 4 [5,] 5 5 5 5 5
rm(z,lixo) z z = lixo(x)

1.5

Obtendo valores internos em um loop: Isto no funciona:

for (x in 1:5){ y = x^2 x y }

Isto funciona:
for (x in 1:5){ y = x^2 print(c(x,y)) }

2-

Grficos em R

2.1#

Plotando o grfico da densidade normal padro:


2.1 plotando o grfico na normal padro

x = seq(-5,5,0.1) fx = dnorm(x) par(mfrow=c(1,1)) plot(x,fx)

0 .0

0 .1

0 .2

fx

0 .3

0 .4

-4

-2

0 x

2.2-

Plotando vrios tipos de grficos

?plot()

par(mfrow = c(2,2)) plot(x,fx,type="p") plot(x,fx,type="l") plot(x,fx,type="s") plot(x,fx,type="n")

0.4

0.3

0.2

0.1

0.0

-4

-2

0 x

0.0 -4

0.1

0.2

fx

fx

0.3

0.4

-2

0 x

0.4

0.3

0.2

0.1

0.0

-4

-2

0 x

0.0 -4

0.1

0.2

fx

fx

0.3

0.4

-2

0 x

2.3 -

Colorindo os grficos
col col col col = = = = "blue") "green") "red") "cyan")

plot(x,fx,type="p", plot(x,fx,type="l", plot(x,fx,type="s", plot(x,fx,type="h",

0.4

0.3

0.2

0.1

0.0

-4

-2

0 x

0.0 -4

0.1

0.2

fx

fx

0.3

0.4

-2

0 x

0.4

0.3

0.2

0.1

0.0

-4

-2

0 x

0.0 -4

0.1

0.2

fx

fx

0.3

0.4

-2

0 x

Para cores disponveis (657):


Colors() plot(x,fx,type="p", plot(x,fx,type="l", plot(x,fx,type="s", plot(x,fx,type="h", col col col col = = = = 394) 372) 19) 118)

0.4

0.3

0.2

0.1

0.0

-4

-2

0 x

0.0 -4

0.1

0.2

fx

fx

0.3

0.4

-2

0 x

0.4

0.3

0.2

0.1

0.0

-4

-2

0 x

0.0 -4

0.1

0.2

fx

fx

0.3

0.4

-2

0 x

2.4 -

Acrescentando outros detalhes ao grfico

2.4.1- Ttulo, sub-ttulo e fonte


par(mfrow = c(1,1)) plot(dnorm, -5,5, col= "blue", main="FIG. 1 \n Normal padro", sub="FIG. 1 Normal padro",)

FIG. 1 Normal padro


0.4 dnorm(x) 0.0 0.1 0.2 0.3

-4

-2

0 FIG. x1 Normal padro

plot(dnorm,-5,5,main="FIG. 1- Normal padro",xlab="varivel aleatria X", ylab="F x",col= "blue",font.main=2,font.lab=3)

FIG. 1- Normal padro


0 .4 0 .0 0 .1 0 .2 Fx 0 .3

-4

-2

0 varivel aleatria X

2.4.2- Personalizando os eixos


plot(dnorm,-5,5,main="FIG. 1- Normal padro",col= "blue",font.main=1,axes=F, xlab="",ylab="")

FIG. 1- Normal padro

?axis() axis(1,c(-5:5), col = rgb(1,0,1)) axis(2,seq(0,0.5,0.05)) box()


FIG. 1- Normal padro
0.4 0.0 0.1 0.2 Fx 0.3

-4

-2

0 varivel aleatria X

2.4.3 Adicionando outro grfico


plot(pnorm,-5,5,main="FIG. 1- Normal padro",xlab="varivel aleatria X", ylab="F x",col= "blue",font.main=1,font.lab=3) x = seq(-5,5,0.1) lines(x,dnorm(x),col="red")

FIG. 1- Normal padro


1.0 Fx 0.0 0.2 0.4 0.6 0.8

-4

-2

0 varivel aleatria X

2.4.4- Adicionando Linhas


abline(h=0.5, col="yellow") abline(v=0, col="yellow") abline(0.5,dnorm(0),col="blue") lines(c(-4,4),c(0.2,0.8),col="green")

FIG. 1- Normal padro


1.0 Fx 0.0 0.2 0.4 0.6 0.8

-4

-2

0 varivel aleatria X

2.4.5- Adicionando legendas

x = seq(0,1,0.1) y = (1-x)^2 + rnorm(length(x),0,0.2) plot(c(0,1),c(-0.2,1.2),type="n") points(x,y,pch=16) m1 = lm(y~x) y1 = m1$coef[1]+m1$coef[2]*x lines(x,y1,col="red") text(0.7, 0.95, expression(bold(m1)*":"*hat(y)[1]== hat(beta)[0] + hat(beta)[1]*"x"),col="red") x2 = x^2 m2 = lm(y~x+x2) y2 = m2$coef[1]+m2$coef[2]*x+m2$coef[3]*x2 lines(x,y2,col="blue") text(0.7, 0.85, expression(bold(m1)*":"*hat(y)[1]== hat(beta)[0] + hat(beta)[1]*"x" + hat(beta)[2]*"x"^2),col="blue")

1.0

1.2

c(-0.2, 1.2)

-0.2

0.0

0.2

0.4

0.6

0.8

^ + ^ x ^ = m1:y 1 0 1 ^ + ^ x+ ^ x2 ^ = m1:y 1 0 1 2

0.0

0.2

0.4 c(0, 1)

0.6

0.8

1.0

2.4.6 Adicionando legendas com valores


x = seq(0,1,0.1) y = (1-x)^2 + rnorm(length(x),0,0.2) plot(c(0,1),c(-0.2,1.2),type="n") points(x,y,pch=16) m1 = lm(y~x) y1 = m1$coef[1]+m1$coef[2]*x lines(x,y1,col="red") t1 = paste("m1: y1 =",round(m1$coef[1],2)," + ",round(m1$coef[2],2)," x") text(0.7, 0.95,t1,col="red") x2 = x^2 m2 = lm(y~x+x2) y2 = m2$coef[1]+m2$coef[2]*x+m2$coef[3]*x2 lines(x,y2,col="blue") t2 = paste("m2: y2 =",round(m2$coef[1],2)," + ", round(m2$coef[2],2)," x"," + ",round(m2$coef[3],2)," x^2") text(0.7, 0.85,t2,col="blue")

1.0

1.2

m1: y1 = 0.9 + -1.04 x m2: y2 = 0.97 + -1.49 x + 0.46 x^2

c(-0.2, 1.2)

-0.2 0.0

0.0

0.2

0.4

0.6

0.8

0.2

0.4 c(0, 1)

0.6

0.8

1.0

2.5

Grficos 3D

ls() data(volcano) ls() ?volcano() persp(volcano)

volcano

Mudando o ngulo de viso:


persp(volcano, theta=70, phi=40, col="red")

Z
volcan o

2.5.1 Funes de duas variveis


y = x = seq(-2,2,length=20) f = function(x,y){ fxy = x^2 + y^2 return(fxy) } z = outer(x,y,f) persp(x,y,z,theta=30,phi=30, col="green")