8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg&...

19
!"#$"%! % '()*+) ,(-.(/0*1 23)4(0 5.67(11 8197()*: 5.67(11 ;*(14-*7*+) 8--6- % '()*+) ,(-.(/0*1 %< =>() .1 ( 0()*+) ?(-.(/0*@ #< '()*+) ?(-.(/0*1 A.)> 7409B0* .+:.3()6-1 !< C.D+E ( 0()*+) ?(-.(/0* F< C(3)6- 2+(0G1.1 H< '()*+) ,(-.(/0*1 (1 ( I*1B6+1* $< J6B.+E A.)> 7*(14-*7*+) *--6- =>() .1 ( 0()*+) ?(-.(/0*@ ! K " L # L ! M 2 0()*+) ?(-.(/0* .1 ( ?(-.(/0* )>() .1 4+7*(14-*:N /4) .1 >GB6)>*1.O*: )6 *L.1) =>() .1 ( 0()*+) ?(-.(/0*@ ! K " L # L # L M P>* -*0(96+1>.B /*)A**+ ( 0()*+) ?(-.(/0* (+: .)1 6/1*-?*: 364+)*-B(-)

Transcript of 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg&...

Page 1: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

%&

'()*+)&,(-.(/0*1&

23)4(0&5.67(11&

8197()*:&5.67(11&

;*(14-*7*+)&8--6-&

%&

'()*+)&,(-.(/0*1&

%<  =>()&.1&(&0()*+)&?(-.(/0*@&

#<  '()*+)&?(-.(/0*1&A.)>&7409B0*&.+:.3()6-1&

!<  C.D+E&(&0()*+)&?(-.(/0*&

F<  C(3)6-&2+(0G1.1&H<  '()*+)&,(-.(/0*1&(1&(&I*1B6+1*&$<  J6B.+E&A.)>&7*(14-*7*+)&*--6-&

=>()&.1&(&0()*+)&?(-.(/0*@&

!&K&"L&#L&

&!&M&2&0()*+)&?(-.(/0*&.1&(&?(-.(/0*&)>()&.1&&&&&4+7*(14-*:N&/4)&.1&>GB6)>*1.O*:&)6&*L.1)&&

=>()&.1&(&0()*+)&?(-.(/0*@&

!&K&"L&#L&

&#L&M&P>*&-*0(96+1>.B&/*)A**+&(&0()*+)&?(-.(/0*&(+:&.)1&6/1*-?*:&364+)*-B(-)&

Page 2: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

#&

=>()&.1&(&0()*+)&?(-.(/0*@&

!&K&"L&#L&

&"L&M&P>*&*--6-&.+&)>*&7*(14-*7*+)&6Q&L&/G&!&&

'()*+)&8L6E*+641&,(-.(/0*1&

!&K&"L&#L&

KR&#L!S"L&

'()*+)&8+:6E*+641&,(-.(/0*1&

$&T&%G&#G&

G&R&#G$&S&%G&

&&'()*+)&8+:6E*+641&,(-.(/0*1&

$&T&%G&#G&

&M&,(-.(+3*&.+&-*1B6+1*&)6&B-*:.3)6-1&

&&

Page 3: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

!&

'()*+)&,(-.(/0*1&

%<  =>()&.1&(&0()*+)&?(-.(/0*@&

#<  '()*+)&?(-.(/0*1&A.)>&7409B0*&.+:.3()6-1&

!<  C.D+E&(&0()*+)&?(-.(/0*&

F<  C(3)6-&2+(0G1.1&H<  '()*+)&,(-.(/0*1&(1&(&I*1B6+1*&$<  J6B.+E&A.)>&7*(14-*7*+)&*--6-&

=>()&.Q&U+*&;*(14-*7*+)&206+*&.1+V)&,*-G&W66:@&

X.)-6E*+&

X&Y)-.B&J606-&

Z%&

[+(334-()*&;(3>.+*&

Z#&

Y)4\1&P(1)*:&X&

Z!&

'()*+)&,(-.(/0*1&(1&P>*6-*93(0&J6+1)-43)1&

Y)6-7&].1)4-/(+3*&

=(?*&^*.E>)1&

"%&

_-*3.B.)(96+&[+)*+1.)G&

U+1>6-*&]*)-.)41&

"#&

"!&

'()*+)&,(-.(/0*1&(1&P>*6-*93(0&J6+1)-43)1&

Y)6-7&].1)4-/(+3*&

=(?*&^*.E>)1&

"%&

_-*3.B.)(96+&[+)*+1.)G&

U+1>6-*&]*)-.)41&

"#&

"!&

"’1&(-*&?(-.(96+&.+&6/1*-?(96+1&+6)&*LB0(.+*:&/G&1)6-7&:.1)4-/(+3*&

Page 4: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

F&

J6+3*B)&,(0.:.)GM&&P>*&C(00(3G&6Q&X(7.+E&

_-*:(96+&[+)*+1.)G&

Y4+&Y)(-&]*+1.)G&

"%&

'6/1)*-&]*+1.)G&

Y>**B>*(:&]*+1.)G&

"#&

"!&

"’1&(-*&?(-.(96+&.+&6/1*-?(96+1&+6)&*LB0(.+*:&/G&B-*:(96+&.+)*+1.)G@@@&

“The skepticism regarding 'latent variables' among many statisticians can probably be attributed to the metaphysical status of hypothetical constructs. On the other hand ... the concept of a 'good statistician' is not real, but nevertheless useful …”

- Skrondal and Rabe-Hesketh#

'()*+)&,(-.(/0*1&

%<  =>()&.1&(&0()*+)&?(-.(/0*@&

#<  '()*+)&?(-.(/0*1&A.)>&7409B0*&.+:.3()6-1&

!<  C(3)6-&2+(0G1.1&F<  '()*+)&,(-.(/0*1&(1&(&I*1B6+1*&H<  J6B.+E&A.)>&7*(14-*7*+)&*--6-&

Page 5: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

H&

'()*+)&,(-.(/0*1&A.)>&;409B0*&[+:.3()6-1&

!&

K%&"L%&

K#&

K!&

"L#&

"L!&

#L%&#L#&

#L!&

'()*+)&?(-.(/0*1&-*B-*1*+)1&1>(-*:&.+Q6-7(96+&6Q&.+:.3()6-1&

J6776+&36+3*B)4(0&:.(E-(7&6Q&YB*(-7(+’1&(+(0G1.1&6Q&“W`P>*6-GN”&)>*&.:*(&6Q&(&E*+*-(0.O*:&.+)*00.E*+3*&Q(3)6-&4+:*-0G.+E&)*1)&B*-Q6-7(+3*<&&X6)*&1>(-*:&?(-.(+3*&6Q&)*1)1&.+:.3()*&“E<”&

'()*+)&?(-.(/0*1&-*B-*1*+)1&1>(-*:&.+Q6-7(96+&6Q&.+:.3()6-1&

!&K%&

"L%&

K#&K!&"L#&

"L!&

[+:.3()6-1&7(G&J6?(-G&Q6-&U)>*-&I*(16+1&

!&

K%&"L%&

K#&

K!&

"L#&

"L!&

#L%&#L#&

#L!&

Page 6: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

$&

[+:.3()6-1&7(G&J6?(-G&Q6-&J(41(0&I*(16+1&

!&

K%&"L%&

K#&

K!&

"L#&

"L!&

#L%&#L#&

#L!&

;(G/*&-*1B*3.QG&G64-&76:*0@&

].a*-*+)&;*(14-*7*+)1&

20E(0&J6?*-&

b&J6?*-&"L%&

c4(:-()&]*+1.9*1&

5(+:&P-(+1*3)1&

"L#&

"L!&

;409B0*&_-6B*-9*1&

W-(O.+E&].1)4-/(+3*&

20E(*&'61)&

"L%&

J>(+E*&.+&W-(O*-&]*+1.)G&

5.)*1&B*-&(0E(&

"L#&

"L!&

I*B*()*:&;*(14-*1&

C.1>&]*+1.)G&

C.1>&()&)%&"L%&

C.1>&()&)#&

C.1>&()&)!&

"L#&

"L!&

Page 7: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

d&

;409`Y(7B0*&

C.1>&]*+1.)G&

J64+)&/G&U/1*-?*-&%&

"L%&

J64+)&/G&U/1*-?*-&#&

J64+)&/G&U/1*-?*-&!&

"L#&

"L!&

8?(04(9+E&=>*)>*-&[+:.3()6-1&=.00&;(e*&(&W66:&'()*+)&,(-.(/0*&

!"#$%&$'()*%%$+,-*.#/(&&&&&&&&&&&&G%&&&&&&&&&&&&&&G#&&&&&&&&&&G!&&&&&&&& &&GF&&&&&&&&&&&GH&G%&&&&&&&&%<fff&G#&&&&&&&&f<g!!&&&&&&%<fff&G!&&&&&&&&f<h%!&&&&&&f<h!F&&&&&%<fff&GF&&&&&&&&f<dd!&&&&&&f<d#h&&&&&f<$g!&&&&%<fff&GH&&&&&&&&f<d!f&&&&&&f<$F$&&&&&f<$f!&&&&f<g$g&&&&&&%<fff&

GF&

GH&

$1'

G%&

G#&

G!&

i%j  J6--*0(96+1&(76+E&3(+:.:()*&.+:.3()6-1&)*00&41&A>*)>*-&:()(&.1&36+1.1)*+)&A.)>&A>()&.1&.7B0.*:&/G&64-&76:*0<&&

i#j  X6)*&36--*0(96+1&(-*&(00&1)-6+EN&/4)&+6)&(00&*k4(00G&1)-6+E<&P>.1&1>6A1&41&)>()&)>*1*&(-*&+6)&-*:4+:(+)&.+:.3()6-1&)>()&(-*&367B0*)*0G&.+)*-3>(+E*(/0*<&

i!j  &[+&B(-9340(-N&?(-.(/0*1&GF&(+:&GH&(-*&76-*&1)-6+E0G&36--*0()*:&A.)>&*(3>&6)>*-&)>(+&A.)>&)>*&6)>*-&?(-1<&

C.L.+E&_(-(7*)*-1&Q6-&[:*+9l(/.0.)G&

GF&

GH&

$1'

G%&

G#&

G!&

i%j  X6)*&A*&+**:&)6&mlLn&167*&B(-(7*)*-1&i1B*3.QG&)>*.-&?(04*1j&Q6-&.:*+9l(/.0.)G<&&

i#j  [+&)>.1&3(1*N&[&3>61*&)6&1*)&?(-.(+3*&6Q&0()*+)&?(-.(/0*&R&%<f<&&

i!j  P>*&6)>*-&3>6.3*&A640:&/*&)6&lL&6+*&6Q&)>*&B()>&36*o3.*+)1&)6&%<f<&&

iFj  C.L.+E&(&06(:.+E&)6&%&B4)1&)>*&0()*+)&?(-.(/0*&6+&)>*&13(0*&6Q&)>()&.+:.3()6-<&&

iHj  P*1)&76:*0&A.)>&:.a*-*+)&B()>1&lL*:&)6&%&)6&*+14-*&)>()&G64-&0()*+)&?(-.(/0*&.1&E66:&

%1'

%2'

%3'

%4'

%5'

&1'0(

'()*+)&,(-.(/0*&A.)>&PA6&[+:.3()6-1&

$1'G%&

G#&

%1'

%2'

%<  _-6/0*7&`&A*&>(?*&6+0G&6+*&B.*3*&6Q&.+Q6-7(96+&(/64)&G%&(+:&G#&`&)>*.-&36--*0(96+&iR&f<g!!j<&&

#<  ;6:*0&>(1&)A6&B()>&36*o3.*+)1N&B041&)>*&?(-.(+3*&6Q&64-&0()*+)&?(-.(/0*<&&

!<  &=*&3(+&lL&)>*&?(04*&6Q&64-&',&)6&%N&/4)&)>()&1900&0*(?*1&41&A.)>&6+*&e+6A&(+:&)A6&4+e+6A+1<&

XUP&[]8XP[C[8]<&&

!.$(1*+2-*./(34$.(54$%$(,%$(*.+6(53*(7.'78,5*%#9(54$6(4,&$($:2,+(3$7;45(7.(54$($#-<,-*.(*=(54$(>?(@,"#$.5(*54$%(7.=*%<,-*.AB((

1*9(3$(8,.(#5,.',%'7C$(54$(53*(<$,#2%$#9(,.'(*.+6($#-<,5$(,(#7.;+$(D,%,<$5$%(=*%("*54(D,54#B(

(1'

(1'

Page 8: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

h&

=>G&p1*&'()*+)&,(-.(/0*1&A.)>&;409B0*&[+:.3()6-1@&

%<  5*q*-&(334-(3G&.+&7*(14-*7*+)&6Q&-*0(96+1>.B1&:4*&)6&1>(-*:&?(-.(96+&/*)A**+&.+:.3()6-1<&

#<  T64&3(++6)&7*(14-*&(&)>*6-*93(0&36+1)-43)r&&&

'()*+)&,(-.(/0*1&

%<  =>()&.1&(&0()*+)&?(-.(/0*@&

#<  '()*+)&?(-.(/0*1&A.)>&7409B0*&.+:.3()6-1&

!<  C.D+E&(&0()*+)&?(-.(/0*&

F<  C(3)6-&2+(0G1.1&H<  '()*+)&,(-.(/0*1&(1&(&I*1B6+1*&$<  J6B.+E&A.)>&7*(14-*7*+)&*--6-&

EF,<D+$/(GD*#$<,-#<(7.(H*7#*.(I,%5(J%*;#(

Y(+)61N&s<J<&t&J(++()*00(N&]<J<&i#f%%j<&_>*+6)GB.3&.+)*E-(96+&*7*-E*1&Q-67&(B61*7(917&(+:&13(0*&.+&B6.16+&Q-6E1<&!"#$%&'()*%&+$(,%&-$.%&/%-%+%0&1230&415674132%&

=>()&:-.?*1&)>*&*?60496+&6Q&A(-+.+E&3606-(96+@&

K*'6(8*.'7-*.L(M*F78756L( I7$5L(

Page 9: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

g&

2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E&[+:*B*+:*+)&J6+)-(1)1&

Y(+)61&(+:&J(++()*00(&#f%%&_X2Y&

santosCov <-read.table("santosCov.txt", na.strings=".")santosCov <-as.matrix(santosCov)

santosCFA1<-' Aposematism =~ Alkaloid.quantity + Alkaloid.diversity +

Conspicuous.coloration'

santosFit1<-sem(santosCFA1, sample.cov=santoCov, sample.nobs=21)

2B61*7(917&(1&(&'()*+)&,(-.(/0*&

2B61*7(917&

20e(06.:&c4(+9)G&

"L%&

20e(06.:&&].?*-1.)G&

J6+1B.34641&J606-(96+&

"L#&

"L!&

#L%&

#L#&

#L!&

&&

Y(+)61&t&J(++()*00(&#f%%&_X2Y&&

2B61*7(917&(1&(&'()*+)&,(-.(/0*&

Estimate Std.err Z-value P(>|z|)Latent variables: Aposematism =~ Alkaloid.quan 1.000 Alkaloid.dive 2.358 0.558 4.223 0.000 Conspicuous.c 0.753 0.215 3.502 0.000

Variances: Alkaloid.quan -0.000 0.000 -0.190 0.849 Alkaloid.dive 0.004 0.002 2.376 0.018 Conspicuous.c 0.001 0.000 2.905 0.004 Aposematism 0.001 0.000 2.915 0.004

2B61*7(917&

20e(06.:&c4(+9)G&

`f<f!&

20e(06.:&&].?*-1.)G&

J6+1B.34641&J606-(96+&

f<!d&

f<H!&

%<f%&

f<dg&

f<df&

&&%&

Y(+)61&t&J(++()*00(&#f%%&_X2Y&&

^(GA66:&3(1*M&+*E(9?*&*197()*&6Q&?(-.(+3*<&&J(+&.+:.3()*&6?*-l)&.+:.3()6-<&&200&A.)>.+&-64+:.+E&*--6-&>*-*N&(1&.+:.3()6-&A(1&lL*:N&(+:&?(-.(+3*&+6)&:.a*-*+)&Q-67&f&

8L*-3.1*M&C.D+E&'()*+)&,(-.(/0*1&

!&K%&"L%&

K#&

K!&

"L#&

"L!&

#L%&#L#&

#L!&

• &P>*&Y(+)61&36?(-.(+3*&7()-.L&>(1&7(+G&6)>*-&?(-.(/0*1&-*0()*:&)6&Q-6E&:.*)&(+:&Q-6E&1.O*&u&)-G&64)&V/6:G&1.O*V&(1&(&0()*+)&?(-.(/0*&

Page 10: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

%f&

8L*-3.1*M&C.D+E&'()*+)&,(-.(/0*1&

Y.O*&

'6E<;(11&"L%&

'6E<I;I&

'6E<Y36B*&

"L#&

"L!&

#L%&#L#&

#L!&

santosSize<-'! Size =~ Log.Mass + Log.RMR + Log.Scope'!

santosSizeFit<-sem(santosSize, sample.co=santosCov, sample.nobs=21)!

8L*-3.1*M&C.D+E&'()*+)&,(-.(/0*1&

Y.O*&

'6E<;(11&f<fF&

'6E<I;I&

'6E<Y36B*&

f<%F&

f<%#&

f<gh&f<g!&

f<gF&

Estimate Std.err Z-value P(>|z|) Std.lv Std.all!Latent variables:! Size =~! Log.Mass 1.000 0.096 0.981! Log.RMR 0.815 0.083 9.771 0.000 0.078 0.930! Log.Scope 0.861 0.084 10.228 0.000 0.082 0.938!

c4*196+1@&

'()*+)&,(-.(/0*1&

%<  =>()&.1&(&0()*+)&?(-.(/0*@&

#<  '()*+)&?(-.(/0*1&A.)>&7409B0*&.+:.3()6-1&

!<  C.D+E&(&0()*+)&?(-.(/0*&

F<  C(3)6-&2+(0G1.1&H<  '()*+)&,(-.(/0*1&(1&(&I*1B6+1*&$<  J6B.+E&A.)>&7*(14-*7*+)&*--6-&

Page 11: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

%%&

8L(7B0*M&_>G06E*+*93&JC2r&

2B61*7(917&

20e(06.:&c4(+9)G&

`f<f!&

20e(06.:&&].?*-1.)G&

J6+1B.34641&J606-(96+&

f<!d&

f<H!&

%<f%&

f<dg&

f<df&

&&%&

Y(+)61&t&J(++()*00(&#f%%&_X2Y&&

iJ6+l-7()6-G&C(3)6-&2+(0G1.1j&

8LB06-()6-G&C(3)6-&2+(0G1.1&

_>61B>6-641&

X.)-6E*+&

Y6.0&C(3)6-&%&

J(-/6+&

B^&

W-(.+&Y.O*&Y6.0&C(3)6-&#&

^4741&

)%#&

v &U/1*-?*:&?(-.(/0*1&*LB0(.+*:&/G&36--*0()*:&Q(3)6-1&v &8--6-&.+&6/1*-?*:&?(-.(/0*1&v &54)w*LB06-()6-G&`&XUP&^T_UP^8Y[Y&P8YP[XW<&

"L%&

"L#&

"L!&

"LF&

"LH&

"L$&

J6+l-7()6-G&C(3)6-&2+(0G1.1&

v &P*1)1&A>*)>*-&?(-.(/0*1&1*B(-()*&.+)6&E-64B1&v &p1*Q40&)6&)*1)&(&“7*(14-*7*+)&76:*0”&Q6-&Y8;&v &)%#&-*B-*1*+)1&36776+&?(-.(96+&:4*&)6&6)>*-&Q(3)6-1&

_>61B>6-641&

X.)-6E*+&

Y6.0&&Y)6.3>.67*)-G&

J(-/6+&

B^&

W-(.+&Y.O*& Y6.0&J67B61.96+&

^4741&

)%#&

"L%&

"L#&

"L!&

"LF&

"LH&

"L$&

&%&

&#&

[:*+9l3(96+M&C.L.+E&Y3(0*&Q6-&(&&Y)(+:(-:.O*:&;6:*0&

v &[+&761)&3(1*1N&A*&+**:&)6&B-6?.:*&(&13(0*&Q6-&64-&0()*+)&?(-.(/0*1<&

v &P*1)&)>()&-*140)1&:6+V)&3>(+E*&.Q&G64&3>(+E*&13(0*<&

_>61B>6-641&

X.)-6E*+&

Y6.0&&Y)6.3>.67*)-G&

J(-/6+&

B^&

W-(.+&Y.O*& Y6.0&J67B61.96+&

^4741&

)%#&

"L%&

"L#&

"L!&

"LF&

"LH&

"L$&

%&

%&

&%&

&#&

Page 12: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

%#&

[:*+9l3(96+M&C.L.+E&,(-.(+3*&Q6-&(+&&p+1)(+:(-:.O*:&;6:*0&

v &J>*3e&)6&7(e*&14-*&7*)>6:&6Q&.:*+9l3(96+&:6*1+V)&(0)*-&-*140)1&6Q&JC2&v Y)(+:(-:.O*:&6-&p+1)(+:(-:.O*:&(BB-6(3>&X8J8YY2IT&Q6-&.:*+9l3(96+&

_>61B>6-641&

X.)-6E*+&

Y6.0&&Y)6.3>.67*)-G&

J(-/6+&

B^&

W-(.+&Y.O*& Y6.0&J67B61.96+&

^4741&

)%#&

"L%&

"L#&

"L!&

"LF&

"LH&

"L$&

%&

%&

&%&

&#&

[:*+9l3(96+M&200&'()*+)&,(-.(/0*1&>(?*&P>-**&[+:.3()6-1&A.)>64)&J6--*0()*:&8--6-&

!&

K%&"L%&

K#&

K!&

"L#&

"L!&

%&#L#&

#L!&

P>-**&[+:.3()6-&I40*&`&YpCC[J[8XP&

[:*+9l3(96+M&PA6&[+:.3()6-1&B*-&'()*+)N&;409B0*&'()*+)1N&p+36--*0()*:&[+:.3()6-&,(-.(+3*&

!%&K%&"L%&

K#&"L#&

%

#L#&

PA6&[+:.3()6-&I40*&`&YpCC[J[8XP&

!#&K!&"L!&

KF&"LF&

%

#LF&

[:*+9l3(96+M&[Q&Y67*&[+:.3()6-1&J6?(-GN&8(3>&;41)&^(?*&2)&'*(1)&U+*&p+36--*0()*:&[+:.3()6-&

!%&K%&"L%&

K#&"L#&

%

#L#&

J6--*0()*:&[+:.3()6-&I40*&&`&X8J8YY2IT&

!#&K!&"L!&

KF&"LF&

%

#LF&

Page 13: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

%!&

[:*+9l3(96+M&[Q&[+:.3()6-1&Y>(-*:N&8(3>&'()*+)&X**:1&U+*&p+.k4*&[+:.3()6-&

!%&K%&"L%&

K#&"L#&

%

#L#&

Y>(-*:&[+:.3()6-&I40*&`&X8J8YY2IT&

!#&K!&"L!&

KF&"LF&

#L!#&

%&

#L!%&

87B.-.3(0&p+:*-.:*+9l3(96+&Y900&_611./0*&

!&

K%&"L%&

K#&

K!&

"L#&

"L!&

%&

W*+*-(0&I40*1&Q6-&[:*+9l3(96+&%<  P̀ -40*&1900&>60:1&u&+*3*11(-G&

#<  Y)(+:(-:.O(96+&`&+*3*11(-G&

!<  P>-**&.+:.3()6-&-40*&u&14o3.*+)&

F<  PA6&[+:.3()6-&-40*&u&14o3.*+)&

H<  J6--*0()*:&[+:.3()6-&-40*&u&+*3*11(-G&

$<  Y>(-*:&[+:.3()6-&I40*&`&+*3*11(-G&

NBKB(N*.$(*=(54$#$(,%$("*54(.$8$##,%6(,.'(#2O87$.5P(

8L*-3.1*M&_>G06E*+*93&JC2r&

santosCFA2<-paste(santosCFA1, ' Aposematism =~ Ant.Mite.Specialization+log.Prey

Scale =~ Log.Mass+Log.RMR+Log.Scope+Conspicuous.coloration',

sep="\n")

Page 14: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

%F&

'()*+)&,(-.(/0*1&

%<  =>()&.1&(&0()*+)&?(-.(/0*@&

#<  '()*+)&?(-.(/0*1&A.)>&7409B0*&.+:.3()6-1&

!<  C.D+E&(&0()*+)&?(-.(/0*&

F<  C(3)6-&2+(0G1.1&H<  '()*+)&,(-.(/0*1&(1&(&I*1B6+1*&$<  J6B.+E&A.)>&7*(14-*7*+)&*--6-&

M4$(EF,<D+$/(M4$(;$.$%,+(D$%=*%<,.8$(*=(5%,.#D+,.5$'(D+,.5#(,#(,(=2.8-*.(*=(54$7%(;$.$-8(

'7##7<7+,%756(5*(+*8,+(D*D2+,-*.#B((

Q-67M&

P-(?.1N&Y<8<&(+:&W-(3*N&s<5<&#f%f<&_-*:.39+E&B*-Q6-7(+3*&Q6-&*3606E.3(0&-*1)6-(96+M&(&3(1*&1)4:G&41.+E&-8("9:(&(*);":.<#"(<&=$#*#>.$(*&+88*.$(9#:?&#fM%g#`#fF<&

P>*&P>*6-G&]-.?.+E&)>*&;6:*0.+E&

P>*6-G&14EE*1)1&Q6006A.+E&Q6-&)-(+1B0(+)*:&-8("9:(<&

Path Distance

Latitude Genetic Distance

Performance

Distance effects Gene Flow

/4)&A>()&:6&A*&7*(+&/G&B*-Q6-7(+3*@&

_*-Q6-7(+3*&(1&(&0()*+)&36+1)-43)&_*-Q6-7(+3*&.7B0.*1&367B0*LN&.+)*-36--*0()*:&-*1B6+1*&/G&7(+G&)-(.)1&-*x*39+E&167*&4+:*-0G.+EN&4+7*(14-*:&3(41*&6-&3(41*1<&&

5*&(A(-*&)>()&1.7B0G&0.+e.+E&(&/4+3>&6Q&7*(14-*1&)6&(&0()*+)&?(-.(/0*&:6*1&+6)&7*(+&G64&>(?*&36--*3)0G&1B*3.l*:&)>*&76:*0<&&

U+*&+**:1&)6&1)(G&Q6341*:&6+&)>*&k4*196+&6Q&mA>()&(3)4(00G&3(41*1&)>*&-*1B6+1*1&[&1**@n<&P>.1&.1&>6A&G64&(--.?*&()&B-6B*-&76:*0&1B*3.l3(96+N&+6)&1.7B0G&)>-64E>&(BB0G.+E&)>*&76:*0&1)-43)4-*1&)6&G64-&:()(<&&

GF&

GH&

H$%=*%<,.8$(

G%&

G#&

G!&

N*5$(547#(<*'$+(46D*54$#7C$#(3$(4,&$(Q&$(*"#$%&$'(%$#D*.#$#(34*#$(7.5$%8*%%$+,-*.#(,%$(8*.#7#5$.5(3754(,(#7.;+$(2.'$%+67.;(8,2#$B((

M4$%$(<,6("$(*54$%(547.;#(54,5(7.R2$.8$(60S6T(,.'(,U$85(54$7%(*"#$%&$'(7.5$%8*%%$+,-*.#B((

G+#*9(D$%=*%<,.8$(7#(%$D%$#$.5$'(,#(,(2.7'7<$.#7*.,+(8,2#$(@.*5(,(8*++$8-*.(*=('7#D,%,5$(8,2#$#AB(

Page 15: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

%H&

0(?((+N&'()*+)&[+:.3()6-1N&(+:&I*E-*11.6+&

B*-Q6-7(+3*& 306+*:.(7&

performance ~ clonediam!

B*-Q6-7(+3*&306+*:.(7&

performance =~ clonediam!

p1.+E&'()*+)&,(-.(/0*1&.+&Y8;&

spartinaModel<-'performance =~ clonediam +!!! ! ! ! ! !numbstems + numbinfl + meanht +!!! ! ! ! ! !meanwidth! ! !!!! ! ! ! ! !meanht ~~ meanwidth!

performance ~ geneticdist'!

B*-Q6-7(+3*&

+47/1)*71&

+47/.+x&

7*(+>)&

7*(+A.:)>&

306+*:.(7&

E*+*93:.1)&

%1'

%2'

%3'

%4'

%5'

&'%&

211*11.+E&C.)&

> spartinaFit<-sem(spartinaModel, data=spartina)!> summary(spartinaFit, standardized=T, rsquare=T)!lavaan (0.5-12) converged normally after 154 iterations!

Number of observations 23!

Estimator ML! Minimum Function Test Statistic 12.237! Degrees of freedom 8! P-value (Chi-square) 0.141!

B*-Q6-7(+3*&

+47/1)*71&

+47/.+x&

7*(+>)&

7*(+A.:)>&

306+*:.(7&

E*+*93:.1)&

*%&

*#&

*!&

*F&

*H&

&'%&

J6*o3.*+)1&

Estimate Std.err Z-value P(>|z|) Std.lv Std.all!Latent variables:! performance =~! clonediam 1.000 17.199 0.969! numbstems 0.904 0.079 11.508 0.000 15.555 0.962! numbinfl 0.106 0.015 7.030 0.000 1.822 0.853! meanht 0.643 0.114 5.654 0.000 11.066 0.785! meanwidth 0.076 0.016 4.680 0.000 1.308 0.718!

Regressions:! performance ~! geneticdist -57.134 12.465 -4.584 0.000 -3.322 -0.708!

B*-Q6-7(+3*&

+47/1)*71&

+47/.+x&

7*(+>)&

7*(+A.:)>&

306+*:.(7&

E*+*93:.1)&

*%&

*#&

*!&

*F&

*H&

&'%&

Page 16: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

%$&

C.)&6Q&,(-.(/0*1&

R-Square:!

clonediam 0.938! numbstems 0.925! numbinfl 0.727! meanht 0.617! meanwidth 0.515! performance 0.502!

B*-Q6-7(+3*&

+47/1)*71&

+47/.+x&

7*(+>)&

7*(+A.:)>&

306+*:.(7&

E*+*93:.1)&

*%&

*#&

*!&

*F&

*H&

&'%&

2&'()*+)&8L*-3.1*&

B*-Q6-7(+3*&

+47/1)*71&

+47/.+x&

7*(+>)&

7*(+A.:)>&

306+*:.(7&

E*+*93:.1)&

0(9)4:*&

*%&

*#&

*!&

*F&

*H&

2&'()*+)&8L*-3.1*&

B*-Q6-7(+3*&

+47/1)*71&

+47/.+x&

7*(+>)&

7*(+A.:)>&

306+*:.(7&

E*+*93:.1)&

0(9)4:*&

%1'

%2'

%3'

%4'

%5'

&'

spartinaModel2<-paste(spartinaModel, '! meanht ~ latitude! meanwidth ~ latitude', sep="\n")!

'()*+)&,(-.(/0*1&

%<  =>()&.1&(&0()*+)&?(-.(/0*@&

#<  '()*+)&?(-.(/0*1&A.)>&7409B0*&.+:.3()6-1&

!<  C.D+E&(&0()*+)&?(-.(/0*&

F<  C(3)6-&2+(0G1.1&H<  '()*+)&,(-.(/0*1&(1&(&I*1B6+1*&$<  J6B.+E&A.)>&7*(14-*7*+)&*--6-&

Page 17: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

%d&

'()*+)&,(-.(/0*1&(+:&;*(14-*7*+)&8--6-&

P-4*&J6?*-&UQ&20E(*&

8197()*:&J6?*-&&6Q&20E(*&

8--6-&.+&;*(14-*7*+)&6Q&J6?*-&

%&

'2X]Y2P&;*(14-*7*+)1&6Q&y*0B&J(+6BG&

• &.7(E*-G&(3k4.-*:&(BB-6L<&*?*-G&#&A**e1&Q-67&%ghF`B-*1*+)&&

• &!f&7&-*160496+&].?*-&)-(+1*3)1&

I2Y&_[JPpI8&

J(+6BG&/.67(11R&e*0B.+*11z%HF<hg`$h<$#&

I#&&R&f<$#&

'2X]Y2P&y*0B.+*11&?1<&J(+6BG&5.67(11&

Page 18: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

%h&

=*&3(+&)-(+1Q6-7&1()*00.)*&:()(&)6&3(+6BG&/.67(11N&(+:&lL&)>*&4+1)(+:(-:.O*:&06(:.+E&)6&%<&&&

'2X]Y2P&y*0B.+*11&?1<&J(+6BG&5.67(11&

P-4*&J(+6BG&5.67(11&

;*(14-*:&J(+6BG&5.67(11&

54)&A>()&(/64)&*--6-@&

=*&e+6A&)>()&I#R%`*197()*:&?(-"6/1*-?*:&?(-&

"LR&i%`I#j&

p+1)(+:(-:.O*:&;*(14-*7*+)&8--6-&R"Lz?(-i;*(14-*:&J(+6BG&5.67(11j&

"L& i%j&

'*)V1&'66e&()&)>*&'P8I&:()(M&]()(&_-*B&

library(lavaan) lter<-read.csv("./lter_kelp.csv")

#1) Calculate fitted values for spring biomass #landsat observations to biomass lter$landsat_spring_biomass<-154.89*lter$spring_canopy+68.62

#2) Calculate fitted values for summer biomass #summer kelp counts to biomass y=0.08x+0.01 r^2=0.79 lter$summer_kelp_biomass<-0.08*lter$kelp+0.01

#3) Transform fitted values for easier fitting #transformation for easier fitting lter$summer_kelp_biomass<-log(lter$summer_kelp_biomass+1) lter$landsat_spring_biomass <-log(lter$landsat_spring_biomass +1)

f<dH&

'2X]Y2P&y*0B.+*11&?1<&J(+6BG&5.67(11&C.)&)>.1&;6:*0r&

'2X]Y2P&YB-.+E&&J(+6BG&5.67(11&

;*(14-*:&Y477*-&y*0B&5.67(11&

i4+1)(+:(-:.O*:&36*o3.*+)1j&

f<Hf&

if<#$j&

noerror<-'summer_kelp_biomass ~ landsat_spring_biomass'

'2X]Y2P&y*0B.+*11&?1<&J(+6BG&5.67(11&

P-4*&YB-.+E&y*0B&&5.67(11&

;*(14-*:&YB-.+E&&J(+6BG&5.67(11&

f<!h&

i%j&

;*(14-*:&Y477*-&y*0B&5.67(11&

{

var(lter$landsat_spring_biomass, na.rm=T)*(0.38)

[1] 3.762301

errorCanopy<-'true_spring_biomass =~ 1*landsat_spring_biomasssummer_kelp_biomass ~ true_spring_biomass

#errorlandsat_spring_biomass ~~ 3.762301*landsat_spring_biomass

'

I#Rf<$#N&%`f<$#Rf<!h&

Page 19: 8 9 Latent Variablesjarrettbyrnes.info/ubc_sem/notes/8_9_Latent_Variables.pdfg& 2&_>G06E*+*93&2BB-6(3>&)6&Y8;&41.+E& [+:*B*+:*+)&J6+)-(1)1& Y(+)61&(+:&J(++()*00(&#f%%&_X2Y& santosCov

!"#$"%!&

%g&

[+36-B6-(9+E&7*(14-*7*+)&*--6-&.+&)>*&B-*:.3)6-&.+3-*(1*1&)>*&36*o3.*+)&1.O*&(+:&(764+)&6Q&

?(-.(+3*&*LB0(.+*:&

'2X]Y2P&y*0B.+*11&?1<&J(+6BG&5.67(11&

P-4*&YB-.+E&y*0B&&5.67(11&

'2X]Y2P&YB-.+E&&J(+6BG&5.67(11&

f<!h&

i%j&

;*(14-*:&Y477*-&y*0B&5.67(11&

f<$!&

if<F%j&

f<dg&

f<$f&

8L*-3.1*M&J6:*&)>.1&76:*0r&P-4*&YB-.+E&y*0B&&

5.67(11&

'2X]Y2P&YB-.+E&&J(+6BG&5.67(11&

f<!h&

i%j&

;*(14-*:&Y477*-&y*0B&5.67(11&

f<#%&

Y477*-&y*0B&5.67(11& &

i%j&

var(lter$summer_kelp_biomass, na.rm=T)*(0.21)[1] 0.5495345

error_both<-'true_spring_biomass =~ 1*landsat_spring_biomasstrue_summer_biomass =~ 1*summer_kelp_biomass

true_summer_biomass ~ true_spring_biomass

#errorlandsat_spring_biomass ~~ 3.762301*landsat_spring_biomasssummer_kelp_biomass ~~ 0.5495345* summer_kelp_biomass

'

'2X]Y2P&y*0B.+*11&?1<&J(+6BG&5.67(11&

P-4*&YB-.+E&y*0B&&J(+6BG&5.67(11&

;*(14-*:&YB-.+E&&J(+6BG&5.67(11&

f<!h&

i%j&

;*(14-*:&Y477*-&y*0B&5.67(11&

f<#%&

Y477*-&y*0B&5.67(11&

f<Hf&

f<d%&

if<F%j&

;*(14-*7*+)&*--6-&.+&)>*&-*1B6+1*&(a*3)1&1)(+:(-:.O*:&36*o3.*+)1&(+:&*197()*1&6Q&*--6-N&

/4)&+6)&)>*&4+1)(+:(-:.O*:&36*o3.*+)<&

i%j&f<dg& f<hg&

I*(16+1&)6&P>.+e&(/64)&;*(14-*7*+)&8--6-&

%<  =*&e+6A&64-&7*(14-*7*+)1&(-*&+6)&B*-Q*3)r&

#<  [+3-*(1*:&(334-(3G&.+&*197(9+E&-*0(96+1>.B1&/*)A**+&?(-.(/0*1<&

!<  [+3-*(1.+E&*LB0(+()6-G&B6A*-&6Q&G64-&>(-:`*(-+*:&7*(14-*7*+)1<&