Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- extensions [ stats ]
- to setup
- clear-all
- crt 5 [ fd 10 ]
- end
- to go
- ; Create some data as nested list (two variables for each turtle):
- let data [(list xcor ycor)] of turtles
- ; Create a stats table:
- let tbl stats:newtable-from-row-list data
- ; Calculate a correlation matrix with `stats:correlation`:
- let cor-list stats:correlation tbl
- ; In 2x2 case you can use the second element from the first row to get the coefficient:
- print item 0 item 1 cor-list
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement