<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>SAC</title>
		<description></description>
		<link>http://scottchamberlain.info/</link>
		
			<item>
				<title>In support of open access - My first letter turning down a review for OA</title>
				<description>&lt;h2&gt;Open access&lt;/h2&gt;

&lt;p&gt;I want open access to succeed. It&#39;s important for so many reasons, which have been expressed much more clearly than I can ever say. Briefly, OA is important because&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the public (and scientists) shouldn&#39;t have to pay for science that they already payed for in taxes&lt;/li&gt;
&lt;li&gt;many publishers are making a pretty penny off the backs of scientists - they can still make money in an OA business model, but the advantage with OA is that they still make money, but consumers of literature aren&#39;t being screwed&lt;/li&gt;
&lt;li&gt;work will be more reproducible as everyone has access&lt;/li&gt;
&lt;li&gt;text mining can hopefully happen (depending on the license)&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;The letter just sent to ESA&lt;/h2&gt;

&lt;p&gt;Dear Editor,&lt;/p&gt;

&lt;p&gt;Thank you for your invitation to review for your journal. Because Ecology is not open access and does not provide its back content to an open resource venue (JSTOR is very closed), I regret that I am unwilling to do this review.  In the event that you do change your policies, then I will be happy to review for you.&lt;/p&gt;

&lt;p&gt;The scientific literature is at present the most significant resource available to researchers. Without access to the literature science can not reach its full potential because all science is built on the backs of others. Without the free input of manuscripts and referees’ many journals would not exist. By and large, the great majority of the work published is paid for by taxpayers. We now, either as individuals or as researchers whose grants are top-sliced, have to pay to read our own work and that of our colleagues, either personally or through our institutes’ libraries. I find that, increasingly, literature that is not available by open access is simply being ignored. Moreover, I am very aware that, increasingly, discovering information from the literature relies on some sort of computational analysis. This can only be effective if the entire content of primary research papers is freely available.&lt;/p&gt;

&lt;p&gt;There are now several good models for open access publication (e.g., PLOS, eLife, PeerJ), and I would urge ESA to adopt one of these. I realize that as a society journal, ESA is not after the huge profit margin that Elsevier or Spring are after, but nonetheless, I feel I have to make a stand for open access If I want it to succeed.&lt;/p&gt;

&lt;p&gt;I realize the hypocrisy of this if I also submit papers to ESA closed access journals - thus, I will refrain from submitting to ESA&#39;s closed access journals.&lt;/p&gt;

&lt;p&gt;Yours sincerely,&lt;/p&gt;

&lt;p&gt;Scott Chamberlain
Simon Fraser University&lt;/p&gt;

&lt;h2&gt;Attribution&lt;/h2&gt;

&lt;p&gt;This letter was modified from a blog post by Casey Bergman &lt;a href=&quot;http://caseybergman.wordpress.com/2011/12/02/just-say-no/&quot;&gt;here&lt;/a&gt;.&lt;/p&gt;
</description>
				<published>2013-04-10 00:00:00 -0700</published>
				<link>http://scottchamberlain.info//2013/04/10/open-access-letter/</link>
			</item>
		
			<item>
				<title>testing ifttt recipe, ignore</title>
				<description>&lt;p&gt;testing ifttt recipe&lt;/p&gt;
</description>
				<published>2013-01-26 00:00:00 -0800</published>
				<link>http://scottchamberlain.info//2013/01/26/ifttt-test/</link>
			</item>
		
			<item>
				<title>where to publish</title>
				<description>&lt;p&gt;A few ecologists have discussed on their respective blogs how to decide where to publish, including &lt;a href=&quot;http://dynamicecology.wordpress.com/2013/01/24/advice-how-to-decide-where-to-submit-your-paper/&quot;&gt;Jeremy Fox&lt;/a&gt;, &lt;a href=&quot;http://jabberwocky.weecology.org/2013/01/24/some-alternative-advice-on-how-to-decide-where-to-submit-your-paper/&quot;&gt;Ethan White&lt;/a&gt;, and &lt;a href=&quot;http://timotheepoisot.fr/2013/01/24/where-to-submit/&quot;&gt;Tim Poisot&lt;/a&gt;. Using the topics below that were used by Ethan, Tim, and Jeremy.&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;I offer up not advice (as I&#39;m not old and sage enough to give advice), but thoughts, on the same issue.&lt;/p&gt;

&lt;hr /&gt;

&lt;h3&gt;Aim as high as you reasonably can.&lt;/h3&gt;

&lt;p&gt;This is usually the advice I&#39;m given, but I try to not pay attention to this, perhaps because I know I&#39;m not going to be E.O. Wilson, or get a Harvard gig, and Nature or Science will probably not be accepting any of my papers as they accept very few ecology papers anyway.&lt;/p&gt;

&lt;h3&gt;Don’t just go by journal prestige; consider “fit”.&lt;/h3&gt;

&lt;p&gt;At the moment I do think about this, but I am chomping at the bit to not have to think about this, and go for publishing in &lt;a href=&quot;http://www.plosone.org/&quot;&gt;PloS One&lt;/a&gt;, &lt;a href=&quot;https://peerj.com/&quot;&gt;PeerJ&lt;/a&gt;, or &lt;a href=&quot;http://elife.elifesciences.org/&quot;&gt;eLife&lt;/a&gt;, where there really isn&#39;t fit to consider. When reviewing papers for a journal, one of the tasks is to consider fit, so on the reviewing side, fit has to be considered. With the adoption of megajournals though, all this fit business will go away.&lt;/p&gt;

&lt;h3&gt;How much will it cost?&lt;/h3&gt;

&lt;p&gt;I have never recieved a grant, so I have been scared off by big page charges, but as a student I was often able to obtain a fee waiver.&lt;/p&gt;

&lt;h3&gt;How likely is the journal to send your paper out for external review?&lt;/h3&gt;

&lt;p&gt;This has only happened to me once (where paper didn&#39;t get sent out for review) at American Naturalist, otherwise don&#39;t think about it much.&lt;/p&gt;

&lt;h3&gt;Is the journal open access?&lt;/h3&gt;

&lt;p&gt;I would publish in only OA journals if I could. The benefits are overwhelming: more people will potentially read your work - leading to more citations (if that matters to you); OA papers can be mashed up and text mined for meta-analyses, etc.; the most important of which reasons is the fact that most research is publicly funded, but publishers are making a pretty penny off of publishing without providing a whole lot of value to science (e.g., PloS may make money but all papers are OA). However, the biggest impediment to this IMHO is co-authors. That is, all papers I write are with at least a few co-authors. Everyone on the paper has to agree on the journal to submit to - and let&#39;s be honest, most academics don&#39;t get the open access movement at all. My mentors think I should shoot for high impact factor journals so I can get a good job, etc., blah blah blah.  If that is the way academia works, that sucks. The &lt;a href=&quot;http://www.doaj.org/&quot;&gt;DOAJ&lt;/a&gt; is a great place to look for an open access journal in your discipline.&lt;/p&gt;

&lt;h3&gt;Does the journal evaluate papers only on technical soundness?&lt;/h3&gt;

&lt;p&gt;I wish this was the case, that they didn&#39;t judge on how significant your p-values are, but this will be a hard habti for scientists to not think about when reviewing a paper.&lt;/p&gt;

&lt;h3&gt;Is the journal part of a review cascade?&lt;/h3&gt;

&lt;p&gt;Don&#39;t care.&lt;/p&gt;

&lt;h3&gt;Is it a society journal?&lt;/h3&gt;

&lt;p&gt;I&#39;ll quote &lt;a href=&quot;http://timotheepoisot.fr/2013/01/24/where-to-submit/&quot;&gt;Tim Poisot&lt;/a&gt; on this: &quot;Frankly my dear, I don&#39;t give a damn.&quot;&lt;/p&gt;

&lt;h3&gt;Have you had good experiences with the journal in the past?&lt;/h3&gt;

&lt;p&gt;Don&#39;t care.&lt;/p&gt;

&lt;h3&gt;Is there anyone on the editorial board who’d be a good person to handle your paper?&lt;/h3&gt;

&lt;p&gt;Don&#39;t care.&lt;/p&gt;

&lt;hr /&gt;

&lt;h3&gt;To conclude...&lt;/h3&gt;

&lt;p&gt;The most important thing to me is moving to publishing in open access journals. If I had single authored papers, I would do this. However, as stated above, having co-authors means not getting what you want.  IMHO, if we want to change academia away from a pay-walled city that only cares about how many papers and their impact factors, we need to start ignoring the conventional wisdom that we have think about impact factor 24/7.  I will say though, that my opinion may not fit with some academics as they are trying for a hard core academic job, whereas I am trying to diversify more :)&lt;/p&gt;

&lt;hr /&gt;

&lt;h4&gt;Get the .Rmd file used to create this post &lt;a href=&quot;https://github.com/SChamberlain/scott/blob/gh-pages/_drafts/2013-01-25-where-to-publish.Rmd&quot;&gt;at my github account&lt;/a&gt; - or &lt;a href=&quot;https://github.com/SChamberlain/scott/blob/gh-pages/_posts/2013-01-25-where-to-publish.md&quot;&gt;.md file&lt;/a&gt;.&lt;/h4&gt;

&lt;h4&gt;Written in &lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;Markdown&lt;/a&gt;, with help from &lt;a href=&quot;http://yihui.name/knitr/&quot;&gt;knitr&lt;/a&gt;.&lt;/h4&gt;
</description>
				<published>2013-01-25 00:00:00 -0800</published>
				<link>http://scottchamberlain.info//2013/01/25/where-to-publish/</link>
			</item>
		
			<item>
				<title>Networks phylogeny</title>
				<description>&lt;h3&gt;Reasoning&lt;/h3&gt;

&lt;p&gt;Made a phylogeny ecologist style for a paper I am working on in which we are asking questions about how species traits and phylogenetic history influence species interaction networks (plant-pollinator).&lt;/p&gt;

&lt;p&gt;There were about 500 species to make a phylogeny for, including birds and insects, and many species that were bound to end up as large polytomies. I couldn&#39;t in reasonable time make a molecular phylogeny for this group of species, so made one ecologist style. If only there was a Phylomatic for other taxonomic groups...look out for &lt;a href=&quot;http://phylotastic.org/&quot;&gt;phylotastic&lt;/a&gt; and &lt;a href=&quot;http://opentreeoflife.org/&quot;&gt;opentreeoflife&lt;/a&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;p&gt;That is, I:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Created a topology using [Mesquite software] from published phylogenies, then&lt;/li&gt;
&lt;li&gt;Got node age estimates from &lt;a href=&quot;http://timetree.org/&quot;&gt;timetree.org&lt;/a&gt; (p.s. Wish I could use the new &lt;a href=&quot;http://datelife.org/&quot;&gt;http://datelife.org/&lt;/a&gt;, but there isn&#39;t much there quite yet), then&lt;/li&gt;
&lt;li&gt;Used bladj function in phylocom to stretch out the branch lengths based on the node estimates.&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;Unfortunately, this process can&#39;t all be collected in an R script, but below is the process I followed, which hopefully makes it more reproducible.&lt;/p&gt;

&lt;hr /&gt;

&lt;h3&gt;Notes on which published phylogenies were used for constructing the topology&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Arthropods based on

&lt;ul&gt;
&lt;li&gt;Ishiwata et al. 2010 MolPhyloEvol&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Hymenoptera topology based on

&lt;ul&gt;
&lt;li&gt;Heraty et al. 2011 Mol. Phy. Evol, Fig. 1 Bayesian phylogeny&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Vespidae based on

&lt;ul&gt;
&lt;li&gt;Mines et al. 2007 PNAS&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Bees based on

&lt;ul&gt;
&lt;li&gt;Overall: Danforth et al. 2006 PNAS&lt;/li&gt;
&lt;li&gt;Megachilidae: Gonzalez et al. 2012 SystEntomol&lt;/li&gt;
&lt;li&gt;Apidae: Cardinal et al. 2010 PNAS&lt;/li&gt;
&lt;li&gt;Andrenidae: Danforth et al. 2013 AnnRevEntomol - Fig. 5&lt;/li&gt;
&lt;li&gt;Halictidae: Danforth et al. 2013 AnnRevEntomol - Fig. 6&lt;/li&gt;
&lt;li&gt;Colletidae: not needed, only 2 species&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Coleoptera based on

&lt;ul&gt;
&lt;li&gt;Hunt et al. 2007 Science&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Lepidoptera based on

&lt;ul&gt;
&lt;li&gt;Overall:

&lt;ul&gt;
&lt;li&gt;Mutanen et al. 2010 PRSLB&lt;/li&gt;
&lt;li&gt;Kim et al. 2011 Mol. Phyl. Evol.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Nymphalidae: Freitas &amp;amp; Brown 2004 Syst. Biol. - Figure 3&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Hemiptera based on

&lt;ul&gt;
&lt;li&gt;Cryan and Urban 2011 Systematic Entomology - Figure 2&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Diptera based on

&lt;ul&gt;
&lt;li&gt;Overall: Wiegmann et al. 2011 PNAS - Figure 1&lt;/li&gt;
&lt;li&gt;Bombyliidae: Yeates 1994 Bull. Amer. Mus. Nat. Hist.&lt;/li&gt;
&lt;li&gt;Syrphinae: Mengual et al. 2007 Cladistics&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;TimeTree used to get node ages for phylogeny&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://timetree.org/&quot;&gt;website&lt;/a&gt;, &lt;a href=&quot;https://raw.github.com/SChamberlain/scott/gh-pages/data/nodeages.csv&quot;&gt;here&#39;s a link&lt;/a&gt; to the node ages I used.&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;Used bladj command in phylocom to stretch out branches to get branch lengths, as:&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;./phylocom bladj &amp;gt; out.txt&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;And the actual files used in the call to phylocom:&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://raw.github.com/SChamberlain/scott/gh-pages/data/phylo&quot;&gt;newick file&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://raw.github.com/SChamberlain/scott/gh-pages/data/ages&quot;&gt;node ages file&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;hr /&gt;

&lt;h3&gt;The phylogeny (visualized in FigTree, many nodes are collapsed, it has about 500 species):&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;https://raw.github.com/SChamberlain/scott/gh-pages/img/phylogeny.png&quot; alt=&quot;center&quot; /&gt;&lt;/p&gt;

&lt;hr /&gt;

&lt;h4&gt;Get the .Rmd file used to create this post &lt;a href=&quot;https://github.com/SChamberlain/scott/blob/gh-pages/_drafts/2013-01-24-networks-phylogeny.Rmd&quot;&gt;at my github account&lt;/a&gt; - or &lt;a href=&quot;https://github.com/SChamberlain/scott/blob/gh-pages/_posts/2013-01-24-networks-phylogeny.md&quot;&gt;.md file&lt;/a&gt;.&lt;/h4&gt;

&lt;h4&gt;Written in &lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;Markdown&lt;/a&gt;, with help from &lt;a href=&quot;http://yihui.name/knitr/&quot;&gt;knitr&lt;/a&gt;.&lt;/h4&gt;
</description>
				<published>2013-01-24 00:00:00 -0800</published>
				<link>http://scottchamberlain.info//2013/01/24/networks-phylogeny/</link>
			</item>
		
			<item>
				<title>Easier model diagnostics function</title>
				<description>&lt;p&gt;It&#39;s a pain to write a bunch of lines of code to do model diagnostics. This little function does a nice job of putting out a number of diagnostic plots, and the gives the ANOVA table too, with an option to just write the ANOVA table out as a data.frame so you can easily combine many ANOVA tables for easy writing to CSV for instance.&lt;/p&gt;

&lt;hr /&gt;

&lt;h3&gt;The function&lt;/h3&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;r&quot;&gt;fitmod &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;equation&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; data&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; gimme &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;FALSE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    conn_mod1 &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; lm&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;equation&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; data &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; data&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# run model&lt;/span&gt;
    m1 &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; fortify&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;conn_mod1&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; data&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# adds model residuals/etc to original data.frame&lt;/span&gt;
    anov &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; Anova&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;conn_mod1&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; type &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# so we can get type III SS&lt;/span&gt;
    a &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; ggplot&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;m1&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; aes_string&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;x &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; as.character&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;equation&lt;span class=&quot;p&quot;&gt;)[[&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]]))&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; geom_histogram&lt;span class=&quot;p&quot;&gt;()&lt;/span&gt;
    b &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; qplot&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;.fitted&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; .stdresid&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; data &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; m1&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; geom &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;point&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    c &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; qplot&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;.stdresid&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; data &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; m1&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; geom &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;histogram&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;kr&quot;&gt;if&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;gimme&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        temp &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; data.frame&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;anov&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;4&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;])&lt;/span&gt;
        temp&lt;span class=&quot;o&quot;&gt;$&lt;/span&gt;vars &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; row.names&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;temp&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
        temp
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;else&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        list&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;list&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;anov&lt;span class=&quot;p&quot;&gt;),&lt;/span&gt; do.call&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;grid.arrange&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; list&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;a&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; b&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; c&lt;span class=&quot;p&quot;&gt;)))&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;hr /&gt;

&lt;h3&gt;Just run the model and give results and diagnostic plots. This gives a histogram of the response variable, a plot of the fitted numbers vs. residuals, and a histogram of the residuals.&lt;/h3&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;r&quot;&gt;library&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;car&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt; library&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;ggplot2&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

fitmod&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;Sepal.Length &lt;span class=&quot;o&quot;&gt;~&lt;/span&gt; Sepal.Width &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; Species&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; iris&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;img src=&quot;http://schamberlain.github.com/scott/img/outputall.png&quot; alt=&quot;center&quot; /&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;text&quot;&gt;Response: Sepal.Length
                    Sum Sq  Df F value  Pr(&amp;gt;F)    
(Intercept)           4.12   1   21.32 8.5e-06 ***
Sepal.Width           3.36   1   17.36 5.3e-05 ***
Species               0.50   2    1.29    0.28    
Sepal.Width:Species   0.16   2    0.41    0.67    
Residuals            27.85 144                    
---
Signif. codes:  0 &amp;#39;***&amp;#39; 0.001 &amp;#39;**&amp;#39; 0.01 &amp;#39;*&amp;#39; 0.05 &amp;#39;.&amp;#39; 0.1 &amp;#39; &amp;#39; 1 
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;hr /&gt;

&lt;h3&gt;Or you can run the model and get just the ANOVA table back as a data.frame that can be combined with others, e.g., to write to a CSV file&lt;/h3&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;r&quot;&gt;library&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;plyr&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# Simple example&lt;/span&gt;
fitmod&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;Sepal.Length &lt;span class=&quot;o&quot;&gt;~&lt;/span&gt; Sepal.Width &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; Species&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; iris&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; gimme &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;TRUE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;text&quot;&gt;                     Sum.Sq  Df F.value    Pr..F.                vars
(Intercept)          4.1233   1 21.3225 8.526e-06         (Intercept)
Sepal.Width          3.3569   1 17.3592 5.311e-05         Sepal.Width
Species              0.4982   2  1.2881 2.790e-01             Species
Sepal.Width:Species  0.1572   2  0.4064 6.668e-01 Sepal.Width:Species
Residuals           27.8465 144      NA        NA           Residuals
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;r&quot;&gt;&lt;span class=&quot;c1&quot;&gt;# Or do many in lapply call to combine them&lt;/span&gt;
mymods &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; list&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;Sepal.Length &lt;span class=&quot;o&quot;&gt;~&lt;/span&gt; Sepal.Width &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; Species&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; Petal.Length &lt;span class=&quot;o&quot;&gt;~&lt;/span&gt; Petal.Width &lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; 
    Species&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
out &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; llply&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;mymods&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; fitmod&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;x&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; iris&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;TRUE&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;))&lt;/span&gt;
names&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;out&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; c&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;mod1&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;mod2&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
ldply&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;out&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;




&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;text&quot;&gt;    .id  Sum.Sq  Df  F.value    Pr..F.                vars
1  mod1  4.1233   1  21.3225 8.526e-06         (Intercept)
2  mod1  3.3569   1  17.3592 5.311e-05         Sepal.Width
3  mod1  0.4982   2   1.2881 2.790e-01             Species
4  mod1  0.1572   2   0.4064 6.668e-01 Sepal.Width:Species
5  mod1 27.8465 144       NA        NA           Residuals
6  mod2 13.4329   1 102.8050 1.448e-18         (Intercept)
7  mod2  0.1625   1   1.2438 2.666e-01         Petal.Width
8  mod2  6.7474   2  25.8196 2.614e-10             Species
9  mod2  2.0178   2   7.7213 6.525e-04 Petal.Width:Species
10 mod2 18.8156 144       NA        NA           Residuals
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;hr /&gt;

&lt;h4&gt;Get the .Rmd file used to create this post &lt;a href=&quot;https://github.com/SChamberlain/scott/blob/gh-pages/_drafts/2012-12-10-easier-models.Rmd&quot;&gt;at my github account&lt;/a&gt; - or &lt;a href=&quot;https://github.com/SChamberlain/scott/blob/gh-pages/_posts/2012-12-10-easier-models.md&quot;&gt;.md file&lt;/a&gt;.&lt;/h4&gt;

&lt;h4&gt;Written in &lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;Markdown&lt;/a&gt;, with help from &lt;a href=&quot;http://yihui.name/knitr/&quot;&gt;knitr&lt;/a&gt;.&lt;/h4&gt;
</description>
				<published>2012-12-10 00:00:00 -0800</published>
				<link>http://scottchamberlain.info//2012/12/10/easier-models/</link>
			</item>
		
			<item>
				<title>Setting up an AMI for RStudio on AWS EC2</title>
				<description>&lt;p&gt;Stuff needed to get a RStudio AMI going on Amazon Web Services (AWS).&lt;/p&gt;

&lt;h2&gt;Starting from scratch&lt;/h2&gt;

&lt;h3&gt;Find a public AMI of RStudio, start an instance, then in the terminal:&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Update R to newest version by adding &lt;code&gt;deb http://&amp;lt;my.favorite.cran.mirror&amp;gt;/bin/linux/ubuntu oneiric/&lt;/code&gt; to your &lt;code&gt;sources.list&lt;/code&gt; file -&lt;/li&gt;
&lt;li&gt;back it up first &lt;code&gt;sudo cp /etc/apt/sources.list /etc/apt/sources.list.bckup&lt;/code&gt;,&lt;/li&gt;
&lt;li&gt;then run &lt;code&gt;sudo sh -c &quot;echo &#39;deb http://cran.stat.sfu.ca//bin/linux/ubuntu oneiric/&#39;&amp;gt;&amp;gt;/etc/apt/sources.list&quot;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Change oneiric to your version of Ubuntu (see &lt;a href=&quot;http://cran.r-project.org/bin/linux/ubuntu/&quot;&gt;here&lt;/a&gt;).&lt;/li&gt;
&lt;li&gt;Then run &lt;code&gt;sudo apt-get update&lt;/code&gt;, then &lt;code&gt;sudo apt-get install r-base&lt;/code&gt; to update R.&lt;/li&gt;
&lt;li&gt;helpful sites for install on ubuntu:

&lt;ul&gt;
&lt;li&gt;http://blogs.helsinki.fi/bioinformatics-viikki/documentation/getting-started-with-r-programming/installingrlatest/&lt;/li&gt;
&lt;li&gt;http://help.nceas.ucsb.edu/installing_r_on_ubuntu&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Follow instructions on &lt;a href=&quot;http://rstudio.org/download/server&quot;&gt;RStudio&#39;s website&lt;/a&gt; to update RStudio server version.&lt;/li&gt;
&lt;li&gt;Add new user by &lt;code&gt;sudo adduser username&lt;/code&gt;.  This is the credential you will use to login in to RStudio in the browser on the AMI.&lt;/li&gt;
&lt;/ul&gt;


&lt;hr /&gt;

&lt;h3&gt;I need some stuff on ubuntu to do web calls, which I do a lot of.&lt;/h3&gt;

&lt;h4&gt;Install dependencies for RCurl&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Learned from &lt;a href=&quot;http://www.omegahat.org/RCurl/FAQ.html&quot;&gt;here&lt;/a&gt; that once inside the Linux box on the AWS instance, run &lt;code&gt;sudo apt-get install libcurl4-openssl-dev&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;h4&gt;Install dependencies for XML&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Learned from &lt;a href=&quot;http://stackoverflow.com/questions/7765429/unable-to-install-r-package-in-ubuntu-11-04&quot;&gt;here&lt;/a&gt;, that once inside the Linux box on the AWS instance, run &lt;code&gt;sudo apt-get update&lt;/code&gt; then &lt;code&gt;sudo apt-get install libxml2-dev&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;h4&gt;These will allow to do &lt;code&gt;library(RCurl)&lt;/code&gt; and &lt;code&gt;library(XML)&lt;/code&gt;, both important for making web calls.&lt;/h4&gt;

&lt;hr /&gt;

&lt;h3&gt;Save the AMI as an image you own.  Then you can start up this image any time you want with whatever size instance you want.&lt;/h3&gt;

&lt;h3&gt;Increase size of the hard drive&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://stackoverflow.com/questions/6151695/ec2-instace-on-amazon-and-i-am-greeted-with-no-space-left-on-the-disk&quot;&gt;see here&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;hr /&gt;

&lt;h4&gt;Get the .Rmd file used to create this post &lt;a href=&quot;https://github.com/SChamberlain/scott/blob/gh-pages/_drafts/2012-09-26-using-aws.Rmd&quot;&gt;at my github account&lt;/a&gt; - or &lt;a href=&quot;https://github.com/SChamberlain/scott/tree/gh-pages/_posts/2012-09-26-using-aws.md&quot;&gt;.md file&lt;/a&gt;.&lt;/h4&gt;

&lt;h4&gt;Written in &lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;Markdown&lt;/a&gt;, with help from &lt;a href=&quot;http://yihui.name/knitr/&quot;&gt;knitr&lt;/a&gt;.&lt;/h4&gt;
</description>
				<published>2012-09-26 00:00:00 -0700</published>
				<link>http://scottchamberlain.info//2012/09/26/using-aws/</link>
			</item>
		
			<item>
				<title>Notes on Stouffer et al. 2012 Science</title>
				<description>&lt;h3&gt;Notes&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;title was &quot;Evolutionary conservation of species&#39; roles in food webs&quot;&lt;/li&gt;
&lt;li&gt;used 32 empirical food webs&lt;/li&gt;
&lt;li&gt;questions were:

&lt;ul&gt;
&lt;li&gt;do species have consistent &quot;roles&quot; across different food webs they are embedded in, and&lt;/li&gt;
&lt;li&gt;are species roles phylogenetically conserved&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Found that

&lt;ul&gt;
&lt;li&gt;species roles (motifs) are conserved across different communities&lt;/li&gt;
&lt;li&gt;species benefit to the community (they call dynamic importance - bascially is the impact that the motif they are in has on community persistence simulations of the empirical networks) is homogenous - closely related species to have similar benefit to their community than expected at random&lt;/li&gt;
&lt;li&gt;at larger taxonomic scales, they show that phyla, classes, orders, and families, tend to play similar roles betlween New Zealand food webs, and all other food webs.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Other questions

&lt;ul&gt;
&lt;li&gt;What are the mechanisms for the evolutionary conservation of species roles?

&lt;ul&gt;
&lt;li&gt;Is it related to similarity in traits?&lt;/li&gt;
&lt;li&gt;or possibly similarity in abundance?&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Is there conservation of species roles in mutualistic plant-pollinator networks?

&lt;ul&gt;
&lt;li&gt;this paper only looked at food webs.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Potential problems

&lt;ul&gt;
&lt;li&gt;they did not provide code, so can&#39;t necessarily replicate what they did&lt;/li&gt;
&lt;li&gt;can we look at where species are in motifs with bipartite networks?  that is, species of similar type (plants) can’t interact with one another

&lt;ul&gt;
&lt;li&gt;probably: just means that motifs are of a more limited set, that is, whereas in a food web you can have a triangle, you can only have an open triangle in a bipartite network&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;&lt;img src=&quot;http://schamberlain.github.com/scott/img/triangle.png&quot; alt=&quot;triangle&quot; /&gt;&lt;/p&gt;

&lt;p&gt;VS.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;http://schamberlain.github.com/scott/img/triangle_open.png&quot; alt=&quot;triangle&quot; /&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Code: asked for code form Daniel Stouffer - it was not provided in the paper&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;How can we do something similar with bipartite networks?&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Problems, in bipartite networks:

&lt;ul&gt;
&lt;li&gt;there is no directionality to links, so that decreases the unique graphlets/motifs&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Possible solutions:

&lt;ul&gt;
&lt;li&gt;Use modules? (Olesen &lt;em&gt;et. al.&lt;/em&gt; 2007) talk about modules as roles in bipartite networks, however this isn&#39;t the same as motifs. Motifs/graphlets are asking what roles do species play in sub-structures of the network, whereas with modules we can say whether a species plays the role of a module hub, network hub, connector, or peripheral (according to Olesen terminology).  But this isn&#39;t the same as motif/graphlets.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;


&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;r&quot;&gt;library&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;bipartite&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
data&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;small1976&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
res &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; computeModules&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;small1976&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# takes several minutes!&lt;/span&gt;
plotModuleWeb&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;res&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;img src=&quot;http://schamberlain.github.com/scott/img/modules.png&quot; alt=&quot;center&quot; /&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;+ Converting bipartite two-mode networks to one-mode networks
    + One option is to convert two-mode bipartite networks into one-mode networks, which results in two one-mode networks, one for plants and one for pollinators.  Then, each one-mode network represents links shared by species in the same partite.  With this, one can look at motifs and graphlets, but what does that mean?  If a certain plant species X is found in a lot of motifs of a certain kind, does that tell us anything about the two-mode bipartite network of plant-pollinator interactions?
&lt;/code&gt;&lt;/pre&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;r&quot;&gt;library&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;tnet&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
library&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;bipartite&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

data&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;small1976&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# load small1976 network (it’s a matrix)&lt;/span&gt;
mat &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; as.data.frame&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;small1976&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# convert to data.frame&lt;/span&gt;
mat &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; mat&lt;span class=&quot;p&quot;&gt;[,&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# get samller matrix for ease&lt;/span&gt;
plotweb&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;mat&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# bipartite plot&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;img src=&quot;http://schamberlain.github.com/scott/img/twovsonemode1.png&quot; alt=&quot;center&quot; /&gt;&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;r&quot;&gt;row.names&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;mat&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;NULL&lt;/span&gt;
mat_elist &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; web2edges&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;mat&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k-Variable&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# convert to edgelist&lt;/span&gt;
mat_onemode &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; projecting_tm&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;mat_elist&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; method &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;Newman&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# make into one-mode network&lt;/span&gt;
mat_onemode_i &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; tnet_igraph&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;mat_onemode&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; directed &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k-Variable&quot;&gt;F&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# convert to igraph object for plotting&lt;/span&gt;
plot&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;mat_onemode_i&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# plot one-mode undirected graph&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;img src=&quot;http://schamberlain.github.com/scott/img/twovsonemode2.png&quot; alt=&quot;NA&quot; /&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;+ or maybe we can do this: 
&lt;/code&gt;&lt;/pre&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;r&quot;&gt;library&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;tnet&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
library&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;bipartite&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
library&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;reshape2&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
library&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;ggplot2&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

data&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;small1976&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# load small1976 network (it’s a matrix)&lt;/span&gt;
mat &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; as.data.frame&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;small1976&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# convert to data.frame&lt;/span&gt;
mat &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; mat&lt;span class=&quot;p&quot;&gt;[,&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;10&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# get samller matrix for ease&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;# plotweb(mat) # bipartite plot&lt;/span&gt;
row.names&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;mat&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; &lt;span class=&quot;kc&quot;&gt;NULL&lt;/span&gt;
mat_elist &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; web2edges&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;mat&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kr&quot;&gt;return&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k-Variable&quot;&gt;T&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# convert to edgelist&lt;/span&gt;
onemode_plants &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; projecting_tm&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;mat_elist&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; method &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;Newman&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# make into one-mode network&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Insects (columns of mat)&lt;/span&gt;
mat2 &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; matrix&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;c&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;mat_elist&lt;span class=&quot;p&quot;&gt;[,&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; mat_elist&lt;span class=&quot;p&quot;&gt;[,&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;],&lt;/span&gt; mat_elist&lt;span class=&quot;p&quot;&gt;[,&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]),&lt;/span&gt; ncol &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;3&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# rearrange to get pollinators in first column&lt;/span&gt;
onemode_pollinators &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; projecting_tm&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;mat2&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; method &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;Newman&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# make into one-mode network&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Combine into one matrix&lt;/span&gt;
dimnames&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;mat_elist&lt;span class=&quot;p&quot;&gt;)[[&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; c&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;i&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;j&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;w&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
dimnames&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;onemode_plants&lt;span class=&quot;p&quot;&gt;)[[&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; c&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;i&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;j&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;w&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
dimnames&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;onemode_pollinators&lt;span class=&quot;p&quot;&gt;)[[&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;2&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; c&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;i&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;j&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;w&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
ee &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; rbind&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;mat_elist&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; onemode_plants&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; onemode_pollinators&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
ee_ &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; dcast&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;ee&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; i &lt;span class=&quot;o&quot;&gt;~&lt;/span&gt; j&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; value.var &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s&quot;&gt;&amp;quot;w&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
ee_&lt;span class=&quot;p&quot;&gt;[&lt;/span&gt;is.na&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;ee_&lt;span class=&quot;p&quot;&gt;)]&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;
row.names&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;ee_&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; ee_&lt;span class=&quot;p&quot;&gt;[,&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;
ee_ &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; ee_&lt;span class=&quot;p&quot;&gt;[,&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;-1&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;]&lt;/span&gt;

&lt;span class=&quot;c1&quot;&gt;# Plotting it&lt;/span&gt;
ee__ &lt;span class=&quot;o&quot;&gt;&amp;lt;-&lt;/span&gt; tnet_igraph&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;ee&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; directed &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k-Variable&quot;&gt;F&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
plot&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;ee__&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;  &lt;span class=&quot;c1&quot;&gt;# where noddes 1-13 are plants, and 14-23 are pollinators&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;&lt;img src=&quot;http://schamberlain.github.com/scott/img/other.png&quot; alt=&quot;center&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Basically a network of plant-pollinator interactions together with the putative competitive/facilitative interactions within each partite (plants and pollinators). Obviously this graph needs coloring for the different types of nodes...&lt;/p&gt;

&lt;hr /&gt;

&lt;h4&gt;Get the .Rmd file used to create this post &lt;a href=&quot;https://github.com/SChamberlain/scott/blob/master/_drafts/2012-09-20-network-roles.Rmd&quot;&gt;at my github account&lt;/a&gt; - or &lt;a href=&quot;https://github.com/SChamberlain/scott/tree/master/_posts/2012-09-20-network-roles.md&quot;&gt;.md file&lt;/a&gt;.&lt;/h4&gt;

&lt;h4&gt;Written in &lt;a href=&quot;http://daringfireball.net/projects/markdown/&quot;&gt;Markdown&lt;/a&gt;, with help from &lt;a href=&quot;http://yihui.name/knitr/&quot;&gt;knitr&lt;/a&gt;, and nice knitr highlighting/etc. in in &lt;a href=&quot;http://rstudio.org/&quot;&gt;RStudio&lt;/a&gt;.&lt;/h4&gt;

&lt;hr /&gt;

&lt;h4&gt;References&lt;/h4&gt;

&lt;p&gt;Olesen JM, Bascompte J, Dupont YL and Jordano P (2007).
&amp;ldquo;The Modularity of Pollination Networks.&amp;rdquo;
&lt;EM&gt;Proceedings of The National Academy of Sciences&lt;/EM&gt;, &lt;B&gt;104&lt;/B&gt;.
ISSN 0027-8424, &lt;a href=&quot;http://dx.doi.org/10.1073/pnas.0706375104&quot;&gt;http://dx.doi.org/10.1073/pnas.0706375104&lt;/a&gt;.

</description>
				<published>2012-09-20 00:00:00 -0700</published>
				<link>http://scottchamberlain.info//2012/09/20/network-roles/</link>
			</item>
		
			<item>
				<title>Notes on doing in-person science interviews</title>
				<description>&lt;p&gt;From chat with Jai Ranganathan on doing in-person science interviews&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choosing space

&lt;ul&gt;
&lt;li&gt;very quiet&lt;/li&gt;
&lt;li&gt;air ventilation very loud - be cognisant of&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Set up/use a media space, talk to conference folks&lt;/li&gt;
&lt;li&gt;Microphones, two ways to go

&lt;ul&gt;
&lt;li&gt;setup that plugs in to the computer, a USB microphone, and record directly into &lt;a href=&quot;http://audacity.sourceforge.net/&quot;&gt;Audacity&lt;/a&gt;.

&lt;ul&gt;
&lt;li&gt;one mic $100 is a USB mic, and a plugin for another mic, brand: &lt;a href=&quot;http://www.amazon.com/Samson-Track-Microphone-Audio-Interface/dp/B0015MJE22&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Not plugged in: solid state microphone - thumb drive in the microphone, some have a 2 channel setup&lt;/li&gt;
&lt;li&gt;loud computer, cold pack under computer to cool it down&lt;/li&gt;
&lt;li&gt;audacity doesn&#39;t save, only saves when you are done.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;microphone not connected to computer, then download to computer later.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Perfect way to do it is do analog to digital conversion outside computer then pass to computer

&lt;ul&gt;
&lt;li&gt;$1000 setup - 2 good condenser microphones that plug in to &quot;Duet&quot; hardware

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://new.apogeedigital.com/products/duet2.php&quot;&gt;Duet&lt;/a&gt;

&lt;ul&gt;
&lt;li&gt;microphones for these are regular with like 1/4 jacks.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Anti-pop device: just screeen in front of microphone - look into, could build my own&lt;/li&gt;
&lt;li&gt;He said max he could do is 4 in one day at a conference.&lt;/li&gt;
&lt;li&gt;Podcasts vs. YouTube

&lt;ul&gt;
&lt;li&gt;podcasts are a niche group, but a fanatical group, so...&lt;/li&gt;
&lt;li&gt;podcasts

&lt;ul&gt;
&lt;li&gt;need server space&lt;/li&gt;
&lt;li&gt;should be relatively easy&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;http://transom.org/?s=microphones&lt;/li&gt;
&lt;li&gt;tips for voice

&lt;ul&gt;
&lt;li&gt;to interviewee before it starts: &quot;relax&quot;&lt;/li&gt;
&lt;li&gt;have an arc of the conversation beforehand, then go over with them, and see if they are okay with it&lt;/li&gt;
&lt;li&gt;book to read

&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://www.amazon.com/Sound-Reporting-Guide-Journalism-Production/dp/0226431789&quot;&gt;NPR guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;keep your voice level, talk slowly very important - 2/3 normal rate.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;get admin access to Journal of Ecology website somehow...?&lt;/li&gt;
&lt;/ul&gt;

</description>
				<published>2012-04-12 00:00:00 -0700</published>
				<link>http://scottchamberlain.info//2012/04/12/doing-interviews-chat-with-jai/</link>
			</item>
		
			<item>
				<title>Digital lysenkoism - an apt analogy for academic publishing?</title>
				<description>&lt;p&gt;Here, I argue that Cory Doctorow&#39;s analogy of publishers insistence on DRM as digitial lysenkoism, is an apt anology to describe many academic publishers.&lt;/p&gt;

&lt;p&gt;On Cory Doctorow&#39;s podcast &lt;a href=&quot;http://craphound.com/&quot;&gt;Craphound&lt;/a&gt;, &lt;a href=&quot;http://craphound.com/?p=3890&quot;&gt;Cory read an essay&lt;/a&gt; he published in &lt;a href=&quot;http://www.publishersweekly.com/pw/by-topic/columns-and-blogs/cory-doctorow/article/50413-with-a-little-help-digital-lysenkoism.html&quot;&gt;Publisher&#39;s Weekly&lt;/a&gt; titled &quot;Digital Lysenkoism&quot;.&lt;/p&gt;

&lt;p&gt;In this essay, Cory suggests that publishers inistence on DRM (&lt;a href=&quot;http://en.wikipedia.org/wiki/DRM&quot;&gt;digital rights management&lt;/a&gt;) is like digital lysenkoism.&lt;/p&gt;

&lt;p&gt;What is lysenkoism? It is basically descendant from Lamarckism, which is a discredited theory that an organism can pass on characteristics acquired during its lifetime to its offspring.&lt;/p&gt;

&lt;p&gt;I think this applies to academic publishers, in the following context: Academic publishers, (e.g., Elsevier) have been peddling a very old publishing model for a long time. Academic publishers surely created value when reprinting scientific articles was extremely expensive.&lt;/p&gt;

&lt;p&gt;In the present, publishing costs are falling, while publisher profits are rising. Publishers are trying to tack on this (comments sections that no one uses) and that (paywalls, charging $30 per paper), like DRM for book publishers, in attempt to survive and make more profits. Instead, they need to evolve, or be pushed out of the way in a struggle for existence against newcomers such as PLoS and PENSOFT.&lt;/p&gt;
</description>
				<published>2012-03-21 00:00:00 -0700</published>
				<link>http://scottchamberlain.info//2012/03/21/digital-lysenkoism/</link>
			</item>
		
			<item>
				<title>Abstract for ESAA 2012 meeting</title>
				<description>&lt;p&gt;I admit that this abstract was written very hastily, but how much better can you do so far ahead of when the actual thing will happen anyhow.&lt;/p&gt;

&lt;h1&gt;Title: Effects of agriculture on evolution of native species&lt;/h1&gt;

&lt;h2&gt;Background/Question/Methods&lt;/h2&gt;

&lt;p&gt;Anthropogenic disturbances, such as urbanization, fragmentation, and introduction of invasive species, can homogenize biotic communities by reducing the variation in species composition across locations. For example, global agricultural intensification has ¬increased pesticide use has and led to increased similarities in both bee and hemipteran communities relative to non-agricultural areas. Agriculture has the potential to significantly impact diversity of natural communities. Proximity to agriculture may lead to altered evolutionary trajectories for native species via altered natural selection. No studies have experimentally examined the possible evolutionary consequences of landscape-level homogenization of biotic interactions. We explored how proximity of wild plants (Helianthus annuus texanus) to crops (crop sunflowers: Helianthus annuus) altered their mutualist and antagonist interaction partners, and subsequent altered natural selection on traits.&lt;/p&gt;

&lt;h2&gt;Results/Conclusions&lt;/h2&gt;

&lt;p&gt;By experimentally manipulating the proximity of a native sunflower species to crop sunflowers, we found that mutualist pollinators largely increased in abundance on wild sunflowers near sunflower crops, while antagonists decreased abundance on wild sunflowers near sunflower crops.  In turn, natural selection on floral traits was altered across the landscape due to changes in abundance and community structure of mutualists and antagonists. Crops altered natural selection on floral traits of native sunflowers, and reduced spatial variation in selection near relative to far from crops. Furthermore, all floral traits have nonzero heritabilities, suggesting that altered natural selection will have evolutionary consequences for this species.&lt;/p&gt;
</description>
				<published>2012-02-24 00:00:00 -0800</published>
				<link>http://scottchamberlain.info//2012/02/24/ESA-2012-abstract/</link>
			</item>
		
	</channel>
</rss>