<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-13819</id>
	<title>Nabble - R</title>
	<updated>2009-11-09T05:23:19Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/R-f13819.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/R-f13819.html" />
	<subtitle type="html">R is a language and environment for statistical computing and graphics. It is a GNU project which is similar to the S language and environment which was developed at Bell Laboratories (formerly AT&amp;T, now Lucent Technologies) by John Chambers and colleagues. R-Project home is &lt;a href=&quot;http://www.r-project.org/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;here&lt;/a&gt;.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26266346</id>
	<title>Re: Incomplete, unbalanced design, and pseudoreplication?</title>
	<published>2009-11-09T05:23:19Z</published>
	<updated>2009-11-09T05:23:19Z</updated>
	<author>
		<name>Dieter Menne</name>
	</author>
	<content type="html">&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Jennifer Mollon wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;The response is a measurement - the amount of DNA extracted during the &amp;nbsp;
&lt;br&gt;experiment. &amp;nbsp;There were 2 factors to be tested - one is the condition &amp;nbsp;
&lt;br&gt;under which the experiment took place and the other is the type of DNA &amp;nbsp;
&lt;br&gt;to be extracted. &amp;nbsp;Each set of factors was replicated, so condition A &amp;nbsp;
&lt;br&gt;and DNA type A were tested twice using the same input material. &amp;nbsp; 
&lt;br&gt;Finally, the whole experiment was repeated twice, but in one of the &amp;nbsp;
&lt;br&gt;experiments there was not enough input material and one of the DNA &amp;nbsp;
&lt;br&gt;types (call it type D) was not tested at all, but all other levels of &amp;nbsp;
&lt;br&gt;that factor and the condition factor were tested. &amp;nbsp;From this, I think:
&lt;br&gt;....
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
This is a classical case for procedure lme in package nlme which is quite robust for unbalanced designs. Arrange your data in the long form; preferably use characters instead of numbers to describe the levels.
&lt;br&gt;Check the book by Pinheiro/Bates for details; or, as a starter, the examples in library/nlme/scripts.
&lt;br&gt;&lt;br&gt;Dieter
&lt;br&gt;&lt;br&gt;Condition DNA &amp;nbsp; &amp;nbsp; &amp;nbsp;Run &amp;nbsp; &amp;nbsp; Amount
&lt;br&gt;CondA &amp;nbsp; &amp;nbsp; DNAA &amp;nbsp; &amp;nbsp;Run1 &amp;nbsp; &amp;nbsp; &amp;nbsp;33
&lt;br&gt;CondA &amp;nbsp; &amp;nbsp; DNAB &amp;nbsp; &amp;nbsp;Run1 &amp;nbsp; &amp;nbsp; 22
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Incomplete%2C-unbalanced-design%2C-and-pseudoreplication--tp26263739p26266346.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26266205</id>
	<title>Re: \\signature macro generated by promptMethods</title>
	<published>2009-11-09T05:12:12Z</published>
	<updated>2009-11-09T05:12:12Z</updated>
	<author>
		<name>Duncan Murdoch-2</name>
	</author>
	<content type="html">On 09/11/2009 7:39 AM, Romain Francois wrote:
&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; promptMethods generate a macro for signatures, but the macro does not 
&lt;br&gt;&amp;gt; exist in the Rd parser.
&lt;br&gt;&lt;br&gt;Right, that's not supposed to be a macro. &amp;nbsp;See ?cbind2 for an example,
&lt;br&gt;&lt;br&gt;\item{\code{signature(x = &amp;quot;ANY&amp;quot;, y = &amp;quot;ANY&amp;quot;)}}{the default method
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;using \R's internal code.}
&lt;br&gt;&lt;br&gt;Duncan Murdoch
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; setClass(&amp;quot;track&amp;quot;,
&lt;br&gt;&amp;gt; + &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;representation(x=&amp;quot;numeric&amp;quot;, y=&amp;quot;numeric&amp;quot;))
&lt;br&gt;&amp;gt; [1] &amp;quot;track&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; setGeneric(&amp;quot;foo&amp;quot;, function(x){ standardGeneric(&amp;quot;foo&amp;quot;) } )
&lt;br&gt;&amp;gt; [1] &amp;quot;foo&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; setMethod( &amp;quot;foo&amp;quot;, &amp;quot;track&amp;quot;, function(x){ NULL } )
&lt;br&gt;&amp;gt; [1] &amp;quot;foo&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; promptMethods( &amp;quot;foo&amp;quot; )
&lt;br&gt;&amp;gt; A shell of methods documentation has been written to the file
&lt;br&gt;&amp;gt; ‘foo-methods.Rd’.
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; writeLines( readLines( &amp;quot;foo-methods.Rd&amp;quot; ) )
&lt;br&gt;&amp;gt; \name{foo-methods}
&lt;br&gt;&amp;gt; \docType{methods}
&lt;br&gt;&amp;gt; \alias{foo-methods}
&lt;br&gt;&amp;gt; \alias{foo,track-method}
&lt;br&gt;&amp;gt; \title{ ~~ Methods for Function foo &amp;nbsp;~~}
&lt;br&gt;&amp;gt; \description{
&lt;br&gt;&amp;gt; &amp;nbsp; ~~ Methods for function \code{foo} &amp;nbsp;~~
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt; \section{Methods}{
&lt;br&gt;&amp;gt; \describe{
&lt;br&gt;&amp;gt; \item{\code{\signature(x = &amp;quot;track&amp;quot;)}}{ ~~describe this method here }
&lt;br&gt;&amp;gt; }}
&lt;br&gt;&amp;gt; \keyword{methods}
&lt;br&gt;&amp;gt; \keyword{ ~~ other possible keyword(s)}
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Romain
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26266205&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-devel-f13821.html&quot; embed=&quot;fixTarget[13821]&quot; target=&quot;_top&quot; &gt;R devel&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/%5C%5Csignature-macro-generated-by-promptMethods-tp26265807p26266205.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26266147</id>
	<title>Re: Quickly generate all possible combinations of 2 groups</title>
	<published>2009-11-09T05:08:57Z</published>
	<updated>2009-11-09T05:08:57Z</updated>
	<author>
		<name>Mike Lawrence</name>
	</author>
	<content type="html">In case anyone is interested in the random variant, here's some code:
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://gist.github.com/229929&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://gist.github.com/229929&lt;/a&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Mike Lawrence
&lt;br&gt;Graduate Student
&lt;br&gt;Department of Psychology
&lt;br&gt;Dalhousie University
&lt;br&gt;&lt;br&gt;Looking to arrange a meeting? Check my public calendar:
&lt;br&gt;&lt;a href=&quot;http://tr.im/mikes_public_calendar&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://tr.im/mikes_public_calendar&lt;/a&gt;&lt;br&gt;&lt;br&gt;~ Certainty is folly... I think. ~
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26266147&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Quickly-generate-all-possible-combinations-of-2-groups-tp26265867p26266147.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26265994</id>
	<title>Re: How to change color the default in levelplot() ?</title>
	<published>2009-11-09T04:55:19Z</published>
	<updated>2009-11-09T04:55:19Z</updated>
	<author>
		<name>jholtman</name>
	</author>
	<content type="html">Here is an example of how I do it using the 'col.regions' parameter:
&lt;br&gt;&lt;br&gt;# create color palette
&lt;br&gt;col.l &amp;lt;- colorRampPalette(c('blue', 'green', 'purple', 'yellow', 'red'))(30)
&lt;br&gt;&lt;br&gt;levelplot(aisle ~ store * pog, storePOG, col.regions=col.l,
&lt;br&gt;&amp;nbsp; &amp;nbsp; cuts=diff(range(as.numeric(as.character(storePOG$aisle)), na.rm=TRUE)),
&lt;br&gt;&amp;nbsp; &amp;nbsp; scales=list(x=list(rot=90, cex=0.5)),
&lt;br&gt;&amp;nbsp; &amp;nbsp; panel=function(x, y, subscripts, ...){
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; panel.levelplot(x, y, subscripts, ...)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ltext(x,y,storePOG$lr[subscripts], fontface=&amp;quot;bold&amp;quot;, cex=.6)
&lt;br&gt;&amp;nbsp; &amp;nbsp; },
&lt;br&gt;&amp;nbsp; &amp;nbsp; xlab=&amp;quot;Store&amp;quot;, ylab=&amp;quot;Planogram&amp;quot;, main=&amp;quot;Physical Aisle Locations&amp;quot;)
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Sun, Nov 8, 2009 at 10:15 PM, BabyL BabyK &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26265994&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;babyl.babyk@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Dear R communities
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; May I seek your advices on how to change color the default in levelplot(), e.g. from the default of pink and light blue, to e.g. red and green ?
&lt;br&gt;&amp;gt; The levelplot function has 1 of the arguments being panel (which is actually panel.levelplot), but I am not sure where the commands to alter the color.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; For example, I type:
&lt;br&gt;&amp;gt; p1&amp;lt;-levelplot(my.mat,colorkey=FALSE),
&lt;br&gt;&amp;gt; how could I include col.regions of panel.levelplot?
&lt;br&gt;&amp;gt; And whether it is right to use the col.regions?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I am using R 2.8.1 in ubuntu.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Many thanks and have a good day!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;        [[alternative HTML version deleted]]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26265994&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Jim Holtman
&lt;br&gt;Cincinnati, OH
&lt;br&gt;+1 513 646 9390
&lt;br&gt;&lt;br&gt;What is the problem that you are trying to solve?
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26265994&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-change-color-the-default-in-levelplot%28%29---tp26261103p26265994.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26265961</id>
	<title>pvclust with squared euclidean distance</title>
	<published>2009-11-09T04:52:51Z</published>
	<updated>2009-11-09T04:52:51Z</updated>
	<author>
		<name>marcos carvajalino</name>
	</author>
	<content type="html">hi,
&lt;br&gt;&lt;br&gt;I'm trying to use pvclust function (pvclust package) to perform a
&lt;br&gt;cluster analysis and finding p-values for groups, however, i need to
&lt;br&gt;use the &amp;quot;squared euclidean distance&amp;quot; method instead of &amp;quot;euclidean
&lt;br&gt;distance&amp;quot; as distance matrix but it seems that the package only allows
&lt;br&gt;the last... any ideas how can I use squared distances instead of the
&lt;br&gt;simple ones in this function?
&lt;br&gt;&lt;br&gt;Many thanks!
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;Marcos Antonio Carvajalino Fernández
&lt;br&gt;Estudiante de Ingeniería Ambiental y Sanitaria
&lt;br&gt;Universidad del Magdalena
&lt;br&gt;Santa Marta, Colombia
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26265961&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/pvclust-with-squared-euclidean-distance-tp26265961p26265961.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26265867</id>
	<title>Quickly generate all possible combinations of 2 groups</title>
	<published>2009-11-09T04:42:51Z</published>
	<updated>2009-11-09T04:42:51Z</updated>
	<author>
		<name>Mike Lawrence</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;I suspect the answer to this query will be the tongue-in-cheek &amp;quot;use a
&lt;br&gt;quantum computer&amp;quot;, but I thought my understanding might be
&lt;br&gt;sufficiently limited that I'm missing a simpler option.
&lt;br&gt;&lt;br&gt;I'm looking for a way to cycle through all possible combinations of 2
&lt;br&gt;groups of data. For 10 data points, that's 2^10 combinations, for 20
&lt;br&gt;data points it's 2^20, etc. combn() from the combinat package is
&lt;br&gt;useful to this purpose, as in:
&lt;br&gt;&lt;br&gt;########
&lt;br&gt;library(combinat)
&lt;br&gt;n=20 #number of data points in the data set
&lt;br&gt;start=proc.time()[3] #start a timer
&lt;br&gt;pb = txtProgressBar(max=n+1,style=3) #initialize a progress bar
&lt;br&gt;for(i in 0:n){ #for each possible size of set1
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Set1 = combn(1:n,i) #get set1 combinations
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Set2 = rev(combn(1:n,n-i)) #get set2 combinations
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; setTxtProgressBar(pb,i+1) #increment the progress bar
&lt;br&gt;}
&lt;br&gt;close(pb) #close the progress bar
&lt;br&gt;proc.time()[3]-start #show the time taken (about 40s @ 2.2GHz)
&lt;br&gt;########
&lt;br&gt;&lt;br&gt;However, this obviously ends up being too slow when the number of data
&lt;br&gt;points rises much above 20 (I'll likely be dealing with data sets to a
&lt;br&gt;maximum of 200 points).
&lt;br&gt;&lt;br&gt;In case it's relevant, the motivation behind this problem is that I'm
&lt;br&gt;seeking an alternative to EM or simplex methods to obtaining the MLE
&lt;br&gt;of mixture data. Given a mixture model consisting of 2 distributions,
&lt;br&gt;I should be able to obtain an MLE by finding the partitioning of the
&lt;br&gt;data into 2 groups that yields the highest likelihood. I'm
&lt;br&gt;specifically looking at modelling circular data by a mixture of
&lt;br&gt;uniform and a Von Mises centered on zero, so once I have a given
&lt;br&gt;partition, I can estimate parameters of the model (proportion of
&lt;br&gt;points drawn from the Von Mises and concentration of the Von Mises)
&lt;br&gt;analytically and compute the likelihood of the data given that pair of
&lt;br&gt;parameters. I've coded a variant of this approach that generates
&lt;br&gt;random partitioning of data, and this seems to to a decent job of
&lt;br&gt;generating something that might be useful as a starting point for a
&lt;br&gt;subsequent EM or simplex search, but I thought I might double check
&lt;br&gt;with the list to see if there's a computationally efficient solution
&lt;br&gt;to the &amp;quot;test all combinations&amp;quot; scheme.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;&lt;br&gt;Mike
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Mike Lawrence
&lt;br&gt;Graduate Student
&lt;br&gt;Department of Psychology
&lt;br&gt;Dalhousie University
&lt;br&gt;&lt;br&gt;Looking to arrange a meeting? Check my public calendar:
&lt;br&gt;&lt;a href=&quot;http://tr.im/mikes_public_calendar&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://tr.im/mikes_public_calendar&lt;/a&gt;&lt;br&gt;&lt;br&gt;~ Certainty is folly... I think. ~
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26265867&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Quickly-generate-all-possible-combinations-of-2-groups-tp26265867p26265867.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26265807</id>
	<title>\\signature macro generated by promptMethods</title>
	<published>2009-11-09T04:39:39Z</published>
	<updated>2009-11-09T04:39:39Z</updated>
	<author>
		<name>Romain Francois-2</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;promptMethods generate a macro for signatures, but the macro does not 
&lt;br&gt;exist in the Rd parser.
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; setClass(&amp;quot;track&amp;quot;,
&lt;br&gt;+ &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;representation(x=&amp;quot;numeric&amp;quot;, y=&amp;quot;numeric&amp;quot;))
&lt;br&gt;[1] &amp;quot;track&amp;quot;
&lt;br&gt;&amp;nbsp;&amp;gt; setGeneric(&amp;quot;foo&amp;quot;, function(x){ standardGeneric(&amp;quot;foo&amp;quot;) } )
&lt;br&gt;[1] &amp;quot;foo&amp;quot;
&lt;br&gt;&amp;nbsp;&amp;gt; setMethod( &amp;quot;foo&amp;quot;, &amp;quot;track&amp;quot;, function(x){ NULL } )
&lt;br&gt;[1] &amp;quot;foo&amp;quot;
&lt;br&gt;&amp;nbsp;&amp;gt; promptMethods( &amp;quot;foo&amp;quot; )
&lt;br&gt;A shell of methods documentation has been written to the file
&lt;br&gt;‘foo-methods.Rd’.
&lt;br&gt;&amp;nbsp;&amp;gt; writeLines( readLines( &amp;quot;foo-methods.Rd&amp;quot; ) )
&lt;br&gt;\name{foo-methods}
&lt;br&gt;\docType{methods}
&lt;br&gt;\alias{foo-methods}
&lt;br&gt;\alias{foo,track-method}
&lt;br&gt;\title{ ~~ Methods for Function foo &amp;nbsp;~~}
&lt;br&gt;\description{
&lt;br&gt;&amp;nbsp; ~~ Methods for function \code{foo} &amp;nbsp;~~
&lt;br&gt;}
&lt;br&gt;\section{Methods}{
&lt;br&gt;\describe{
&lt;br&gt;\item{\code{\signature(x = &amp;quot;track&amp;quot;)}}{ ~~describe this method here }
&lt;br&gt;}}
&lt;br&gt;\keyword{methods}
&lt;br&gt;\keyword{ ~~ other possible keyword(s)}
&lt;br&gt;&lt;br&gt;Romain
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Romain Francois
&lt;br&gt;Professional R Enthusiast
&lt;br&gt;+33(0) 6 28 91 30 30
&lt;br&gt;&lt;a href=&quot;http://romainfrancois.blog.free.fr&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://romainfrancois.blog.free.fr&lt;/a&gt;&lt;br&gt;|- &lt;a href=&quot;http://tr.im/EAD5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://tr.im/EAD5&lt;/a&gt;&amp;nbsp;: LondonR slides
&lt;br&gt;|- &lt;a href=&quot;http://tr.im/BcPw&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://tr.im/BcPw&lt;/a&gt;&amp;nbsp;: celebrating R commit #50000
&lt;br&gt;`- &lt;a href=&quot;http://tr.im/ztCu&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://tr.im/ztCu&lt;/a&gt;&amp;nbsp;: RGG #158:161: examples of package IDPmisc
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26265807&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-devel-f13821.html&quot; embed=&quot;fixTarget[13821]&quot; target=&quot;_top&quot; &gt;R devel&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/%5C%5Csignature-macro-generated-by-promptMethods-tp26265807p26265807.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26264907</id>
	<title>Re: Bug in all.equal() or in the plm package</title>
	<published>2009-11-09T03:24:05Z</published>
	<updated>2009-11-09T03:24:05Z</updated>
	<author>
		<name>Duncan Murdoch-2</name>
	</author>
	<content type="html">Arne Henningsen wrote:
&lt;br&gt;&amp;gt; Hi!
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I noticed that there is a (minor) bug either the command all.equal()
&lt;br&gt;&amp;gt; or in the &amp;quot;plm&amp;quot; package. I demonstrate this using an example taken
&lt;br&gt;&amp;gt; from the documentation of plm():
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;I'm not sure this is a bug, but I'd call it at least a design flaw. &amp;nbsp;The 
&lt;br&gt;problem is that the length.Formula method in the Formula package (which 
&lt;br&gt;plm depends on) returns a vector of length 2. &amp;nbsp;Now there's nothing in R 
&lt;br&gt;that requires length() to return a scalar, but all.equal assumes it 
&lt;br&gt;does, and I'd guess there are lots of other places this assumption is made.
&lt;br&gt;&lt;br&gt;Duncan Murdoch
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; ======================================
&lt;br&gt;&amp;gt; R&amp;gt; data(&amp;quot;Produc&amp;quot;, package=&amp;quot;plm&amp;quot;)
&lt;br&gt;&amp;gt; R&amp;gt; zz &amp;lt;- plm(log(gsp)~log(pcap)+log(pc)+log(emp)+unemp,
&lt;br&gt;&amp;gt; + &amp;nbsp; data=Produc, index=c(&amp;quot;state&amp;quot;,&amp;quot;year&amp;quot;))
&lt;br&gt;&amp;gt; R&amp;gt; all.equal(zz,zz)
&lt;br&gt;&amp;gt; [1] TRUE
&lt;br&gt;&amp;gt; Warning message:
&lt;br&gt;&amp;gt; In if (length(target) != length(current)) return(paste(&amp;quot;target,
&lt;br&gt;&amp;gt; current differ in having response: &amp;quot;, &amp;nbsp;:
&lt;br&gt;&amp;gt; &amp;nbsp; the condition has length &amp;gt; 1 and only the first element will be used
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; all.equal(zz$formula,zz$formula)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; [1] TRUE
&lt;br&gt;&amp;gt; Warning message:
&lt;br&gt;&amp;gt; In if (length(target) != length(current)) return(paste(&amp;quot;target,
&lt;br&gt;&amp;gt; current differ in having response: &amp;quot;, &amp;nbsp;:
&lt;br&gt;&amp;gt; &amp;nbsp; the condition has length &amp;gt; 1 and only the first element will be used
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; class(zz$formula)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; [1] &amp;quot;pFormula&amp;quot; &amp;quot;Formula&amp;quot; &amp;nbsp;&amp;quot;formula&amp;quot;
&lt;br&gt;&amp;gt; ======================================
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; The last commands show that the warning message comes from comparing
&lt;br&gt;&amp;gt; the elements &amp;quot;formula&amp;quot;, which are of the class &amp;quot;pFormula&amp;quot; (inheriting
&lt;br&gt;&amp;gt; from &amp;quot;Formula&amp;quot; and &amp;quot;formula&amp;quot;). It would be great if this issue could
&lt;br&gt;&amp;gt; be fixed in the future.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks a lot,
&lt;br&gt;&amp;gt; Arne
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26264907&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-devel-f13821.html&quot; embed=&quot;fixTarget[13821]&quot; target=&quot;_top&quot; &gt;R devel&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Bug-in-all.equal%28%29-or-in-the-plm-package-tp26264117p26264907.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26264117</id>
	<title>Bug in all.equal() or in the plm package</title>
	<published>2009-11-09T02:29:54Z</published>
	<updated>2009-11-09T02:29:54Z</updated>
	<author>
		<name>Arne Henningsen-4</name>
	</author>
	<content type="html">Hi!
&lt;br&gt;&lt;br&gt;I noticed that there is a (minor) bug either the command all.equal()
&lt;br&gt;or in the &amp;quot;plm&amp;quot; package. I demonstrate this using an example taken
&lt;br&gt;from the documentation of plm():
&lt;br&gt;&lt;br&gt;======================================
&lt;br&gt;R&amp;gt; data(&amp;quot;Produc&amp;quot;, package=&amp;quot;plm&amp;quot;)
&lt;br&gt;R&amp;gt; zz &amp;lt;- plm(log(gsp)~log(pcap)+log(pc)+log(emp)+unemp,
&lt;br&gt;+ &amp;nbsp; data=Produc, index=c(&amp;quot;state&amp;quot;,&amp;quot;year&amp;quot;))
&lt;br&gt;R&amp;gt; all.equal(zz,zz)
&lt;br&gt;[1] TRUE
&lt;br&gt;Warning message:
&lt;br&gt;In if (length(target) != length(current)) return(paste(&amp;quot;target,
&lt;br&gt;current differ in having response: &amp;quot;, &amp;nbsp;:
&lt;br&gt;&amp;nbsp; the condition has length &amp;gt; 1 and only the first element will be used
&lt;br&gt;&amp;gt; all.equal(zz$formula,zz$formula)
&lt;br&gt;[1] TRUE
&lt;br&gt;Warning message:
&lt;br&gt;In if (length(target) != length(current)) return(paste(&amp;quot;target,
&lt;br&gt;current differ in having response: &amp;quot;, &amp;nbsp;:
&lt;br&gt;&amp;nbsp; the condition has length &amp;gt; 1 and only the first element will be used
&lt;br&gt;&amp;gt; class(zz$formula)
&lt;br&gt;[1] &amp;quot;pFormula&amp;quot; &amp;quot;Formula&amp;quot; &amp;nbsp;&amp;quot;formula&amp;quot;
&lt;br&gt;======================================
&lt;br&gt;&lt;br&gt;The last commands show that the warning message comes from comparing
&lt;br&gt;the elements &amp;quot;formula&amp;quot;, which are of the class &amp;quot;pFormula&amp;quot; (inheriting
&lt;br&gt;from &amp;quot;Formula&amp;quot; and &amp;quot;formula&amp;quot;). It would be great if this issue could
&lt;br&gt;be fixed in the future.
&lt;br&gt;&lt;br&gt;Thanks a lot,
&lt;br&gt;Arne
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Arne Henningsen
&lt;br&gt;&lt;a href=&quot;http://www.arne-henningsen.name&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.arne-henningsen.name&lt;/a&gt;&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26264117&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-devel-f13821.html&quot; embed=&quot;fixTarget[13821]&quot; target=&quot;_top&quot; &gt;R devel&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Bug-in-all.equal%28%29-or-in-the-plm-package-tp26264117p26264117.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26264052</id>
	<title>Re: negative log likelihood</title>
	<published>2009-11-09T02:23:07Z</published>
	<updated>2009-11-09T02:23:07Z</updated>
	<author>
		<name>Colin Millar</name>
	</author>
	<content type="html">Sounds like a homework question ...
&lt;br&gt;&amp;nbsp;
&lt;br&gt;if y = a + bx + e, &amp;nbsp;where e ~ N(0, sigma^2)
&lt;br&gt;&amp;nbsp;
&lt;br&gt;the log likelihood of the slope parameter and intercept parameters, a and b, and variance sigma^2 given n data points y and covariates x is
&lt;br&gt;&amp;nbsp;
&lt;br&gt;f(a,b, sigma; y, x) = -0.5*n*log(2 * pi) - n*log(sigma) - 0.5 / sigma^2 * sum_i [ (y_i - (a + b*x_i))^2 ]
&lt;br&gt;&amp;nbsp;
&lt;br&gt;You can simplyfiy this function if you condition on the variance and intercept. &amp;nbsp;
&lt;br&gt;You are then left with a simple function coresponding to the log-likelihood curve.
&lt;br&gt;This function is trivial to minimise.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;Hope this helps.
&lt;br&gt;Colin.
&lt;br&gt;&amp;nbsp;
&lt;br&gt;&lt;br&gt;________________________________
&lt;br&gt;&lt;br&gt;From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26264052&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help-bounces@...&lt;/a&gt; on behalf of mat7770
&lt;br&gt;Sent: Sun 08/11/2009 19:12
&lt;br&gt;To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26264052&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help@...&lt;/a&gt;
&lt;br&gt;Subject: [R] negative log likelihood
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;I have two related variables, each with 16 points (x and Y). I am given
&lt;br&gt;variance and the y-intercept. I know how to create a regression line and
&lt;br&gt;find the residuals, but here is my problem. I have to make a loop that uses
&lt;br&gt;the seq() function, so that it changes the slope value of the y=mx + B
&lt;br&gt;equation ranging from 0-5 in increments of 0.01. The loop also needs to
&lt;br&gt;calculate the negative log likelihood at each slope value and determine the
&lt;br&gt;lowest one. I know that R can compute the best regression line by using
&lt;br&gt;lm(y~x), but I need to see if that value matches the loop functions.
&lt;br&gt;--
&lt;br&gt;View this message in context: &lt;a href=&quot;http://old.nabble.com/negative-log-likelihood-tp26256881p26256881.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/negative-log-likelihood-tp26256881p26256881.html&lt;/a&gt;&lt;br&gt;Sent from the R help mailing list archive at Nabble.com.
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26264052&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;br&gt;______________________________________________________________________
&lt;br&gt;This email has been scanned by the MessageLabs Email Security System.
&lt;br&gt;For more information please visit &lt;a href=&quot;http://www.messagelabs.com/email&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.messagelabs.com/email&lt;/a&gt;&lt;br&gt;______________________________________________________________________
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [[alternative HTML version deleted]]
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26264052&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/negative-log-likelihood-tp26256881p26264052.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26263985</id>
	<title>Re: Hand-crafting an .RData file</title>
	<published>2009-11-09T02:19:12Z</published>
	<updated>2009-11-09T02:19:12Z</updated>
	<author>
		<name>Gabor Grothendieck</name>
	</author>
	<content type="html">You can try read.csv.sql in the sqldf package. It reads a file into an
&lt;br&gt;sqlite database which it creates for you using RSQLite/sqlite thus
&lt;br&gt;effectively its done outside of R. &amp;nbsp;Then it extracts the portion you
&lt;br&gt;specify using an sql statement and destroys the database. &amp;nbsp; Omit the
&lt;br&gt;sql statement if you want the entire file. &amp;nbsp;Don't know if its faster
&lt;br&gt;than read.table when used in that way but its only one line of code so
&lt;br&gt;you could easily try it. &amp;nbsp;See example 13 on home page:
&lt;br&gt;&lt;a href=&quot;http://sqldf.googlecode.com&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://sqldf.googlecode.com&lt;/a&gt;&lt;br&gt;&lt;br&gt;On Mon, Nov 9, 2009 at 12:27 AM, Adam D. I. Kramer &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263985&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;adik@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;        I frequently have to export a large quantity of data from some
&lt;br&gt;&amp;gt; source (for example, a database, or a hand-written perl script) and then
&lt;br&gt;&amp;gt; read it into R.  This occasionally takes a lot of time; I'm usually using
&lt;br&gt;&amp;gt; read.table(&amp;quot;filename&amp;quot;,comment.char=&amp;quot;&amp;quot;,quote=&amp;quot;&amp;quot;) to read the data once it is
&lt;br&gt;&amp;gt; written to disk.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;        However, I *know* that the program that generates the data is more
&lt;br&gt;&amp;gt; or less just calling printf in a for loop to create the csv or tab-delimited
&lt;br&gt;&amp;gt; file, writing, then having R parse it, which is pretty inefficient. Instead,
&lt;br&gt;&amp;gt; I am interested in figuring out how to write the data in .RData
&lt;br&gt;&amp;gt; format so that I can load() it instead of read.table() it.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;        Trolling the internet, however, has not suggested anything about the
&lt;br&gt;&amp;gt; specification for an .RData file. Could somebody link me to a specification
&lt;br&gt;&amp;gt; or some information that would instruct me on how to construct a .RData
&lt;br&gt;&amp;gt; file (either compressed or uncompressed)?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;        Also, I am open to other suggestions of how to get load()-like
&lt;br&gt;&amp;gt; efficiency in some other way.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Many thanks,
&lt;br&gt;&amp;gt; Adam D. I. Kramer
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263985&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263985&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Hand-crafting-an-.RData-file-tp26261482p26263985.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26263739</id>
	<title>Incomplete, unbalanced design, and pseudoreplication?</title>
	<published>2009-11-09T01:57:45Z</published>
	<updated>2009-11-09T01:57:45Z</updated>
	<author>
		<name>Jennifer Mollon</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;I am trying to help someone who has carried out an experiment and I'm &amp;nbsp;
&lt;br&gt;finding it quite difficult to understand the appropriate model to use &amp;nbsp;
&lt;br&gt;&amp; code it.
&lt;br&gt;&lt;br&gt;The response is a measurement - the amount of DNA extracted during the &amp;nbsp;
&lt;br&gt;experiment. &amp;nbsp;There were 2 factors to be tested - one is the condition &amp;nbsp;
&lt;br&gt;under which the experiment took place and the other is the type of DNA &amp;nbsp;
&lt;br&gt;to be extracted. &amp;nbsp;Each set of factors was replicated, so condition A &amp;nbsp;
&lt;br&gt;and DNA type A were tested twice using the same input material. &amp;nbsp; 
&lt;br&gt;Finally, the whole experiment was repeated twice, but in one of the &amp;nbsp;
&lt;br&gt;experiments there was not enough input material and one of the DNA &amp;nbsp;
&lt;br&gt;types (call it type D) was not tested at all, but all other levels of &amp;nbsp;
&lt;br&gt;that factor and the condition factor were tested. &amp;nbsp;From this, I think:
&lt;br&gt;&lt;br&gt;1. The replicates within each experiment are pseudoreplicates - there &amp;nbsp;
&lt;br&gt;are pairs of measures with the same input material, and both factor &amp;nbsp;
&lt;br&gt;levels are the same.
&lt;br&gt;2. The 2 experiments can be treated as blocks, but they are not &amp;nbsp;
&lt;br&gt;balanced or complete.
&lt;br&gt;&lt;br&gt;There are 2 questions of interest to the experimenter:
&lt;br&gt;&lt;br&gt;1. Does the amount of DNA extracted differ for the different DNA types &amp;nbsp;
&lt;br&gt;under the different conditions?
&lt;br&gt;2. One of the conditions is new, and of particular interest. &amp;nbsp;Under &amp;nbsp;
&lt;br&gt;this condition, are there significantly different amounts of DNA &amp;nbsp;
&lt;br&gt;extracted depending on DNA type? &amp;nbsp;There are 2 particular contrasts of &amp;nbsp;
&lt;br&gt;interest here, call them DNA types B&amp;C vs A, and B&amp;C vs D. &amp;nbsp;DNA type D &amp;nbsp;
&lt;br&gt;is only tested in the second experiment.
&lt;br&gt;&lt;br&gt;I would be very grateful for comments about the analysis of this &amp;nbsp;
&lt;br&gt;complicated data set. Are my beliefs above correct, regarding the &amp;nbsp;
&lt;br&gt;design? &amp;nbsp;If so, which R packages and methods can help me with this &amp;nbsp;
&lt;br&gt;analysis? &amp;nbsp;In particular, how should the error term be structured for &amp;nbsp;
&lt;br&gt;this design? &amp;nbsp;And finally, are the 2 research questions best answered &amp;nbsp;
&lt;br&gt;by 2 separate analyses (e.g. the second one looking at only the one &amp;nbsp;
&lt;br&gt;condition in isolation), or can a single analysis of a full model &amp;nbsp;
&lt;br&gt;answer both of these questions?
&lt;br&gt;&lt;br&gt;Many thanks for your consideration and time,
&lt;br&gt;Jen
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263739&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Incomplete%2C-unbalanced-design%2C-and-pseudoreplication--tp26263739p26263739.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26264605</id>
	<title>ImproveProb Function in Design Package</title>
	<published>2009-11-09T01:44:57Z</published>
	<updated>2009-11-09T01:44:57Z</updated>
	<author>
		<name>McAllister, David</name>
	</author>
	<content type="html">Hello
&lt;br&gt;&lt;br&gt;Thanks to Frank Harrell for the great Design package. I noted from Pencina's Article (Statistics in Medicine Vol 27, pp157-172) that the result obtained for the Net Reclassification Index depends upon categorical cut-offs for risk (eg in the paper &amp;lt;6%, 6-20% and &amp;gt;20%). I wondered how the improveprob function arrives at its cut-offs, and whether there was any function to change the default cut-offs used.
&lt;br&gt;&lt;br&gt;Thanks for any help you can offer.
&lt;br&gt;&lt;br&gt;Yours sincerely
&lt;br&gt;&lt;br&gt;David McAllister
&lt;br&gt;&lt;br&gt;&lt;br&gt;*****************************************************************
&lt;br&gt;The information contained in this message may be confide...{{dropped:8}}
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26264605&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/ImproveProb-Function-in-Design-Package-tp26264605p26264605.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26263398</id>
	<title>Re: Antw: Re: compiling R-2.9.2 or R-2.10.0 on ubuntu 9.04	 (powerpc)</title>
	<published>2009-11-09T01:27:50Z</published>
	<updated>2009-11-09T01:27:50Z</updated>
	<author>
		<name>Paul Hiemstra</name>
	</author>
	<content type="html">Laurin Müller wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; i installed:
&lt;br&gt;&amp;gt; &amp;nbsp;libreadline-dev
&lt;br&gt;&amp;gt; &amp;nbsp;libcnf-dev
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; but configure with no readline brings the same error.
&lt;br&gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt; regards,
&lt;br&gt;&amp;gt; laurin
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; Paul Hiemstra &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263398&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;p.hiemstra@...&lt;/a&gt;&amp;gt; 05.11.2009 12:38 &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; sudo apt-get install libreadline-dev
&lt;/div&gt;Try running with readline turned on (the default). In regard to your 
&lt;br&gt;problem, check the value of the LDFLAGS and have a look at the following 
&lt;br&gt;e-mail from the archive (found by googling your error message):
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://www.mail-archive.com/r-help@stat.math.ethz.ch/msg20344.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.mail-archive.com/r-help@.../msg20344.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;cheers,
&lt;br&gt;Paul
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Drs. Paul Hiemstra
&lt;br&gt;Department of Physical Geography
&lt;br&gt;Faculty of Geosciences
&lt;br&gt;University of Utrecht
&lt;br&gt;Heidelberglaan 2
&lt;br&gt;P.O. Box 80.115
&lt;br&gt;3508 TC Utrecht
&lt;br&gt;Phone: &amp;nbsp;+3130 274 3113 Mon-Tue
&lt;br&gt;Phone: &amp;nbsp;+3130 253 5773 Wed-Fri
&lt;br&gt;&lt;a href=&quot;http://intamap.geo.uu.nl/~paul&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://intamap.geo.uu.nl/~paul&lt;/a&gt;&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263398&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/compiling-R-2.9.2-or-R-2.10.0-on-ubuntu-9.04-%28powerpc%29-tp26208637p26263398.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26263217</id>
	<title>Re: order of points in spline</title>
	<published>2009-11-09T01:14:13Z</published>
	<updated>2009-11-09T01:14:13Z</updated>
	<author>
		<name>_nico_</name>
	</author>
	<content type="html">At the end, although the xspline function suggested by Greg did what I needed, it suffers from the fact that you cannot specify the number of points of the output curve.
&lt;br&gt;I then wrote my function for a generic nth grade Bezier curve interpolation. 
&lt;br&gt;You can find the code here if ever you're interested.
&lt;br&gt;&lt;a href=&quot;http://rosettacode.org/wiki/Cubic_bezier_curves#R&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://rosettacode.org/wiki/Cubic_bezier_curves#R&lt;/a&gt;&lt;br&gt;&lt;br&gt;&amp;gt;The spline function (and loess and others) fit regression splines (or approximations) meaning that each value of
&lt;br&gt;&amp;gt;x maps to only 1 value of y. &amp;nbsp;If you want a curve that goes through points in the specified order and is able to 
&lt;br&gt;&amp;gt;wrap back then you probably want the xspline function. &amp;nbsp;See its help page for details.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Hope this helps,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;-- 
&lt;br&gt;&amp;gt;Gregory (Greg) L. Snow Ph.D.
&lt;br&gt;&amp;gt;Statistical Data Center
&lt;br&gt;&amp;gt;Intermountain Healthcare
&lt;br&gt;&amp;gt;greg.snow@imail.org
&lt;br&gt;&amp;gt;801.408.8111
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: r-help-bounces@r-project.org [mailto:r-help-bounces@r-
&lt;br&gt;&amp;gt; project.org] On Behalf Of Nicola Romanò
&lt;br&gt;&amp;gt; Sent: Friday, November 06, 2009 2:07 PM
&lt;br&gt;&amp;gt; To: r-help@r-project.org
&lt;br&gt;&amp;gt; Subject: Re: [R] order of points in spline
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Huh?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Prevent spline from using (x[n],y[n]) as the coordinates of the
&lt;br&gt;&amp;gt; n^{th} data point?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Why on earth would you want to do that?
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Maybe I did not explain myself correctly.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; My first three points have x: &amp;nbsp;262, 275, 264
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I want the spline to go from point 1 (x=262) to point 2 (x=275) and
&lt;br&gt;&amp;gt; then go back on the x axis to point 3 (x=264).
&lt;br&gt;&amp;gt; The function goes from 1 (x=262) to 3 (x=264) to 2 (x=275)
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Please, run my example and you should see for yourself.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; R-help@r-project.org mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-&lt;/a&gt;&lt;br&gt;&amp;gt; guide.html
&lt;br&gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;R-help@r-project.org mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;br&gt;&lt;/quote&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/order-of-points-in-spline-tp26230875p26263217.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26262935</id>
	<title>Re: negative log likelihood</title>
	<published>2009-11-09T00:49:13Z</published>
	<updated>2009-11-09T00:49:13Z</updated>
	<author>
		<name>Bernardo Rangel tura</name>
	</author>
	<content type="html">On Sun, 2009-11-08 at 11:12 -0800, mat7770 wrote:
&lt;br&gt;&amp;gt; I have two related variables, each with 16 points (x and Y). I am given
&lt;br&gt;&amp;gt; variance and the y-intercept. I know how to create a regression line and
&lt;br&gt;&amp;gt; find the residuals, but here is my problem. I have to make a loop that uses
&lt;br&gt;&amp;gt; the seq() function, so that it changes the slope value of the y=mx + B
&lt;br&gt;&amp;gt; equation ranging from 0-5 in increments of 0.01. The loop also needs to
&lt;br&gt;&amp;gt; calculate the negative log likelihood at each slope value and determine the
&lt;br&gt;&amp;gt; lowest one. I know that R can compute the best regression line by using
&lt;br&gt;&amp;gt; lm(y~x), but I need to see if that value matches the loop functions. 
&lt;br&gt;&lt;br&gt;Hi
&lt;br&gt;&lt;br&gt;If I understand your question you need extract log-likelihood for a
&lt;br&gt;linear model, so you need using logLik command, see example:
&lt;br&gt;&lt;br&gt;set.seed(1)
&lt;br&gt;x&amp;lt;-rpois(16,6)
&lt;br&gt;y&amp;lt;-2*x+3+rnorm(16,sd=3)
&lt;br&gt;model&amp;lt;-lm(y~x)
&lt;br&gt;logLik(model)
&lt;br&gt;'log Lik.' -40.1177 (df=3)
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Bernardo Rangel Tura, M.D,MPH,Ph.D
&lt;br&gt;National Institute of Cardiology
&lt;br&gt;Brazil
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26262935&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/negative-log-likelihood-tp26256881p26262935.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26262684</id>
	<title>How to identify what is used as EOL in a given file?</title>
	<published>2009-11-09T00:21:50Z</published>
	<updated>2009-11-09T00:21:50Z</updated>
	<author>
		<name>Johannes Graumann-2</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;Is there any R-generic, OS-agnostic way to figure out what end-of-line 
&lt;br&gt;character is being used in a file to be processed by &amp;quot;readLines&amp;quot;?
&lt;br&gt;&lt;br&gt;Thanks, Joh
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26262684&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-identify-what-is-used-as-EOL-in-a-given-file--tp26262684p26262684.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26262518</id>
	<title>Re: Hand-crafting an .RData file</title>
	<published>2009-11-09T00:05:38Z</published>
	<updated>2009-11-09T00:05:38Z</updated>
	<author>
		<name>Prof Brian Ripley</name>
	</author>
	<content type="html">The R 'save' format (as used for the saved workspace .RData) is 
&lt;br&gt;described in the 'R Internals' manual (section 1.8). &amp;nbsp;It is intended 
&lt;br&gt;for R objects, and you would first have to create one[*] of those in 
&lt;br&gt;your other application. &amp;nbsp;That seems a lot of work.
&lt;br&gt;&lt;br&gt;The normal way to transfer numeric data between applications is to 
&lt;br&gt;write a binary file: R can read such files with readBin(), and it also 
&lt;br&gt;has wrappers/C-code to read a number of commmon binary data formats 
&lt;br&gt;(e.g. those from SPSS).
&lt;br&gt;&lt;br&gt;With character data there are more issues (and more formats, see also 
&lt;br&gt;readChar()), but load() is not particularly fast for those.
&lt;br&gt;&lt;br&gt;Ultimately the R functions pay a performance price for their 
&lt;br&gt;flexibility so hand-crafted C code to read the format can be 
&lt;br&gt;worthwhile: but see the comments below about whether I/O speed is 
&lt;br&gt;that important.
&lt;br&gt;&lt;br&gt;[*] the 'save' format is a serialization of a single R object, even if 
&lt;br&gt;you save many objects, since the object(s) are combined into a 
&lt;br&gt;pairlist.
&lt;br&gt;&lt;br&gt;On Sun, 8 Nov 2009, Adam D. I. Kramer wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Hello,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 	I frequently have to export a large quantity of data from some
&lt;br&gt;&amp;gt; source (for example, a database, or a hand-written perl script) and then
&lt;br&gt;&amp;gt; read it into R. &amp;nbsp;This occasionally takes a lot of time; I'm usually using
&lt;br&gt;&amp;gt; read.table(&amp;quot;filename&amp;quot;,comment.char=&amp;quot;&amp;quot;,quote=&amp;quot;&amp;quot;) to read the data once it is
&lt;br&gt;&amp;gt; written to disk.
&lt;br&gt;&lt;br&gt;Specifying colClasses and nrows will usually help.
&lt;br&gt;&lt;br&gt;To read from a database, packages such as RODBC use binary data 
&lt;br&gt;transfer: with suitable tuning this can be fast.
&lt;br&gt;&lt;br&gt;&amp;gt; 	However, I *know* that the program that generates the data is more
&lt;br&gt;&amp;gt; or less just calling printf in a for loop to create the csv or tab-delimited
&lt;br&gt;&amp;gt; file, writing, then having R parse it, which is pretty inefficient. Instead, 
&lt;br&gt;&amp;gt; I am interested in figuring out how to write the data in .RData
&lt;br&gt;&amp;gt; format so that I can load() it instead of read.table() it.
&lt;br&gt;&lt;br&gt;Without more details it is hard to say if it is inefficient. 
&lt;br&gt;read.table() can read data pretty fast (millions of items per second) 
&lt;br&gt;if used following the hints in the 'R Data' manual. &amp;nbsp;See e.g.
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/pipermail/r-devel/2004-December/031733.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/pipermail/r-devel/2004-December/031733.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Almost anything non-trivial one might do with such data is much 
&lt;br&gt;slower. &amp;nbsp;The trend is to write richer (and slower to read) data 
&lt;br&gt;formats.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 	Trolling the internet, however, has not suggested anything about the
&lt;br&gt;&amp;gt; specification for an .RData file. Could somebody link me to a specification
&lt;br&gt;&amp;gt; or some information that would instruct me on how to construct a .RData
&lt;br&gt;&amp;gt; file (either compressed or uncompressed)?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; 	Also, I am open to other suggestions of how to get load()-like
&lt;br&gt;&amp;gt; efficiency in some other way.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Many thanks,
&lt;br&gt;&amp;gt; Adam D. I. Kramer
&lt;/div&gt;&lt;br&gt;-- 
&lt;br&gt;Brian D. Ripley, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26262518&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ripley@...&lt;/a&gt;
&lt;br&gt;Professor of Applied Statistics, &amp;nbsp;&lt;a href=&quot;http://www.stats.ox.ac.uk/~ripley/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.stats.ox.ac.uk/~ripley/&lt;/a&gt;&lt;br&gt;University of Oxford, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tel: &amp;nbsp;+44 1865 272861 (self)
&lt;br&gt;1 South Parks Road, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +44 1865 272866 (PA)
&lt;br&gt;Oxford OX1 3TG, UK &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fax: &amp;nbsp;+44 1865 272595
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26262518&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Hand-crafting-an-.RData-file-tp26261482p26262518.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26263384</id>
	<title>Re: Models for Discrete Choice in R</title>
	<published>2009-11-08T22:22:15Z</published>
	<updated>2009-11-08T22:22:15Z</updated>
	<author>
		<name>Emmanuel Charpentier-3</name>
	</author>
	<content type="html">Le dimanche 08 novembre 2009 à 19:05 -0600, Frank E Harrell Jr a écrit :
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Emmanuel Charpentier wrote:
&lt;br&gt;&amp;gt; &amp;gt; Le dimanche 08 novembre 2009 à 17:07 -0200, Iuri Gavronski a écrit :
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; I would like to fit Logit models for ordered data, such as those
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; suggested by Greene (2003), p. 736.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Does anyone suggests any package in R for that?
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; look up the polr function in package MASS (and read the relevant pages
&lt;br&gt;&amp;gt; &amp;gt; in V&amp;R4 and some quoted references...) or the slightly more
&lt;br&gt;&amp;gt; &amp;gt; sophisticated (larger range of models) lrm function in F. Harrell's
&lt;br&gt;&amp;gt; &amp;gt; Design (now rms) packge (but be aware that Design is a huge beast witch
&lt;br&gt;&amp;gt; &amp;gt; carries its own &amp;quot;computing universe&amp;quot;, based on (strong) Harrell's view
&lt;br&gt;&amp;gt; &amp;gt; of what a regression analysis should be : reading his book is, IMHO,
&lt;br&gt;&amp;gt; &amp;gt; necessary to understand his choices and agree (or disgree) with them).
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; If you have a multilevel model (a. k. a. one &amp;quot;random effect&amp;quot; grouping),
&lt;br&gt;&amp;gt; &amp;gt; the &amp;quot;repolr&amp;quot; packge aims at that, but I've been unable to use it
&lt;br&gt;&amp;gt; &amp;gt; recently (numerical exceptions).
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; By the way, my dependent variable is ordinal and my independent
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; variables are ratio/intervalar.
&lt;br&gt;&amp;gt; &amp;gt; 
&lt;br&gt;&amp;gt; &amp;gt; Numeric ? Then maybe some recoding/transformation is in order ... in
&lt;br&gt;&amp;gt; &amp;gt; which case Design/rms might or might not be useful.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I'm not clear on what recoding or transformation is needed for an 
&lt;br&gt;&amp;gt; ordinal dependent variable and ratio/interval independent variables, nor 
&lt;br&gt;&amp;gt; why rms/Design would not be useful.
&lt;/div&gt;&lt;br&gt;I was thinking about transformations/recoding of the *independent*
&lt;br&gt;variables... 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Emmanuel Charpentier
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26263384&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Models-for-Discrete-Choice-in-R-tp26256842p26263384.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26261482</id>
	<title>Hand-crafting an .RData file</title>
	<published>2009-11-08T21:27:34Z</published>
	<updated>2009-11-08T21:27:34Z</updated>
	<author>
		<name>Adam D. I. Kramer-2</name>
	</author>
	<content type="html">Hello,
&lt;br&gt;&lt;br&gt;&amp;nbsp;	I frequently have to export a large quantity of data from some
&lt;br&gt;source (for example, a database, or a hand-written perl script) and then
&lt;br&gt;read it into R. &amp;nbsp;This occasionally takes a lot of time; I'm usually using
&lt;br&gt;read.table(&amp;quot;filename&amp;quot;,comment.char=&amp;quot;&amp;quot;,quote=&amp;quot;&amp;quot;) to read the data once it is
&lt;br&gt;written to disk.
&lt;br&gt;&lt;br&gt;&amp;nbsp;	However, I *know* that the program that generates the data is more
&lt;br&gt;or less just calling printf in a for loop to create the csv or tab-delimited
&lt;br&gt;file, writing, then having R parse it, which is pretty inefficient. 
&lt;br&gt;Instead, I am interested in figuring out how to write the data in .RData
&lt;br&gt;format so that I can load() it instead of read.table() it.
&lt;br&gt;&lt;br&gt;&amp;nbsp;	Trolling the internet, however, has not suggested anything about the
&lt;br&gt;specification for an .RData file. Could somebody link me to a specification
&lt;br&gt;or some information that would instruct me on how to construct a .RData
&lt;br&gt;file (either compressed or uncompressed)?
&lt;br&gt;&lt;br&gt;&amp;nbsp;	Also, I am open to other suggestions of how to get load()-like
&lt;br&gt;efficiency in some other way.
&lt;br&gt;&lt;br&gt;Many thanks,
&lt;br&gt;Adam D. I. Kramer
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261482&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Hand-crafting-an-.RData-file-tp26261482p26261482.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26260757</id>
	<title>Bug in gplots::heatmap.2 symbreaks arg default (?)</title>
	<published>2009-11-08T19:22:12Z</published>
	<updated>2009-11-08T19:22:12Z</updated>
	<author>
		<name>Steve Lianoglou-6</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;I think the code to calculate the default value of the symbreaks &amp;nbsp;
&lt;br&gt;argument in the gplots::heatmap.2 function is wrong.
&lt;br&gt;&lt;br&gt;The documentation says symbreaks defaults to true if any negative &amp;nbsp;
&lt;br&gt;values are detected in the data passed in.
&lt;br&gt;&lt;br&gt;The relevant code in the parameter list of this function definition &amp;nbsp;
&lt;br&gt;(gplots 2.7.3) is this:
&lt;br&gt;&lt;br&gt;symbreaks = min(x &amp;lt; 0, na.rm = TRUE) || scale != &amp;quot;none&amp;quot;
&lt;br&gt;&lt;br&gt;When I'm pretty sure it should be:
&lt;br&gt;&lt;br&gt;symbreaks = min(x, na.rm = TRUE) &amp;lt; 0 || scale != &amp;quot;none&amp;quot;
&lt;br&gt;&lt;br&gt;Likewise for the symkey parameter.
&lt;br&gt;&lt;br&gt;Right?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;-steve
&lt;br&gt;&lt;br&gt;--
&lt;br&gt;Steve Lianoglou
&lt;br&gt;Graduate Student: Computational Systems Biology
&lt;br&gt;&amp;nbsp; &amp;nbsp;| &amp;nbsp;Memorial Sloan-Kettering Cancer Center
&lt;br&gt;&amp;nbsp; &amp;nbsp;| &amp;nbsp;Weill Medical College of Cornell University
&lt;br&gt;Contact Info: &lt;a href=&quot;http://cbio.mskcc.org/~lianos/contact&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://cbio.mskcc.org/~lianos/contact&lt;/a&gt;&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260757&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Bug-in-gplots%3A%3Aheatmap.2-symbreaks-arg-default-%28-%29-tp26260757p26260757.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26261103</id>
	<title>How to change color the default in levelplot() ?</title>
	<published>2009-11-08T19:15:04Z</published>
	<updated>2009-11-08T19:15:04Z</updated>
	<author>
		<name>BabyL BabyK</name>
	</author>
	<content type="html">Dear R communities
&lt;br&gt;&lt;br&gt;May I seek your advices on how to change color the default in levelplot(), e.g. from the default of pink and light blue, to e.g. red and green ? 
&lt;br&gt;The levelplot function has 1 of the arguments being panel (which is actually panel.levelplot), but I am not sure where the commands to alter the color. 
&lt;br&gt;&lt;br&gt;For example, I type:
&lt;br&gt;p1&amp;lt;-levelplot(my.mat,colorkey=FALSE),
&lt;br&gt;how could I include col.regions of panel.levelplot? 
&lt;br&gt;And whether it is right to use the col.regions? 
&lt;br&gt;&lt;br&gt;I am using R 2.8.1 in ubuntu.
&lt;br&gt;&lt;br&gt;Many thanks and have a good day! 
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [[alternative HTML version deleted]]
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261103&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/How-to-change-color-the-default-in-levelplot%28%29---tp26261103p26261103.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26260670</id>
	<title>Forward selection peculiarity</title>
	<published>2009-11-08T19:08:21Z</published>
	<updated>2009-11-08T19:08:21Z</updated>
	<author>
		<name>ricefan81</name>
	</author>
	<content type="html">Hi all,
&lt;br&gt;&lt;br&gt;I'm using the mle.stepwise function in the wle package to run forward selection. My statistical background tells me that the first variable selected should be the one with the highest correlation with the response, however that's not the case. The two highest correlations with the response are &amp;quot;similar&amp;quot; (0.86 and 0.89) however the forward selection selects the variable with 0.86 correlation first and then in the next step chooses the variable with correlation 0.89.
&lt;br&gt;&lt;br&gt;Any thoughts on this? Is is this some type of bug in the function or package?
&lt;br&gt;&lt;br&gt;Thanks&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Forward-selection-peculiarity-tp26260670p26260670.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26260168</id>
	<title>RcppTemplate</title>
	<published>2009-11-08T17:48:09Z</published>
	<updated>2009-11-08T17:48:09Z</updated>
	<author>
		<name>Dominick Samperi-2</name>
	</author>
	<content type="html">The Rcpp R/C++ object mapping library and package template has
&lt;br&gt;been updated on CRAN in package RcppTemplate. It allows you
&lt;br&gt;to work with R objects like data frames and zoo time series in
&lt;br&gt;C++ programs. R can call C++ functions, and C++ objects can
&lt;br&gt;call R functions, with parameters and return values of any
&lt;br&gt;of the most commonly used R data types (data frames,
&lt;br&gt;factors, time series, etc.). By using as.zoo, as.irts, as.xts, etc. it
&lt;br&gt;is possible to work with the other commonly used time series
&lt;br&gt;on the C++ side. The main design goal was improved performance.
&lt;br&gt;&lt;br&gt;Dominick
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260168&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-devel-f13821.html&quot; embed=&quot;fixTarget[13821]&quot; target=&quot;_top&quot; &gt;R devel&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/RcppTemplate-tp26260168p26260168.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26265772</id>
	<title>RcppTemplate</title>
	<published>2009-11-08T17:36:25Z</published>
	<updated>2009-11-08T17:36:25Z</updated>
	<author>
		<name>Dominick Samperi</name>
	</author>
	<content type="html">The Rcpp R/C++ object mapping library and package template has
&lt;br&gt;been updated on CRAN in package RcppTemplate. It allows you
&lt;br&gt;to work with R objects like data frames and zoo time series in
&lt;br&gt;C++ programs. R can call C++ functions, and C++ objects can
&lt;br&gt;call R functions, with parameters and return values of any
&lt;br&gt;of the most commonly used R data types (data frames,
&lt;br&gt;factors, time series, etc.). By using as.zoo, as.irts, as.xts, etc. it
&lt;br&gt;is possible to work with the other commonly used time series
&lt;br&gt;on the C++ side. The main design goal was improved performance.
&lt;br&gt;&lt;br&gt;Dominick
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26265772&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-devel-f13821.html&quot; embed=&quot;fixTarget[13821]&quot; target=&quot;_top&quot; &gt;R devel&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/RcppTemplate-tp26265772p26265772.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26260094</id>
	<title>RcppTemplate</title>
	<published>2009-11-08T17:36:25Z</published>
	<updated>2009-11-08T17:36:25Z</updated>
	<author>
		<name>Dominick Samperi</name>
	</author>
	<content type="html">The Rcpp R/C++ object mapping library and package template has
&lt;br&gt;been updated on CRAN in package RcppTemplate. It allows you
&lt;br&gt;to work with R objects like data frames and zoo time series in
&lt;br&gt;C++ programs. R can call C++ functions, and C++ objects can
&lt;br&gt;call R functions, with parameters and return values of any
&lt;br&gt;of the most commonly used R data types (data frames,
&lt;br&gt;factors, time series, etc.). By using as.zoo, as.irts, as.xts, etc. it
&lt;br&gt;is possible to work with the other commonly used time series
&lt;br&gt;on the C++ side. The main design goal was improved performance.
&lt;br&gt;&lt;br&gt;Dominick
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260094&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-SIG-Finance@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-sig-finance&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-sig-finance&lt;/a&gt;&lt;br&gt;-- Subscriber-posting only.
&lt;br&gt;-- If you want to post, subscribe first.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/Rmetrics-f14139.html&quot; embed=&quot;fixTarget[14139]&quot; target=&quot;_top&quot; &gt;Rmetrics&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/RcppTemplate-tp26260094p26260094.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26260084</id>
	<title>Re: reference on contr.helmert and typo on its help page.</title>
	<published>2009-11-08T17:32:41Z</published>
	<updated>2009-11-08T17:32:41Z</updated>
	<author>
		<name>John Fox-6</name>
	</author>
	<content type="html">Dear Peng,
&lt;br&gt;&lt;br&gt;I'm tempted to try to get an entry in the fortunes package but will instead
&lt;br&gt;try to answer your questions directly:
&lt;br&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260084&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260084&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help-bounces@...&lt;/a&gt;]
&lt;br&gt;On
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Behalf Of Peng Yu
&lt;br&gt;&amp;gt; Sent: November-08-09 7:41 PM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260084&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: Re: [R] reference on contr.helmert and typo on its help page.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Dear John,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I did read Section 9.1.2 and various other textbooks before posting my
&lt;br&gt;&amp;gt; questions. But each reference uses slightly different notations and
&lt;br&gt;&amp;gt; terminology. I get confused and would like a description that
&lt;br&gt;&amp;gt; summaries everything so that I don't have to refer to many different
&lt;br&gt;&amp;gt; resources. May I ask a few questions on the section in your textbook?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Which variable in Section 9.1.2 is &amp;quot;a matrix of contrasts&amp;quot; mentioned
&lt;br&gt;&amp;gt; in the help page of 'contr.helmert'? Which matrix of contrast in R
&lt;br&gt;&amp;gt; corresponds to dummy regression? With different R formula, e.g. y ~ x
&lt;br&gt;&amp;gt; vs. y ~ x -1, $X_F$ (mentioned on page 189) is different and hence
&lt;br&gt;&amp;gt; $\beta_F$ (mentioned in eq. 9.3) is be different. So my understanding
&lt;br&gt;&amp;gt; is that the matrix of contrast should depend on the formula. But it is
&lt;br&gt;&amp;gt; not according to the help page of &amp;quot;contr.helmert&amp;quot;.
&lt;/div&gt;&lt;br&gt;If the model is simply y ~ A, for the factor A, then cbind(1, contrasts(A))
&lt;br&gt;is what I call X_B, the row-basis of the model matrix. As I explain in the
&lt;br&gt;section that you read, the level means are mu = X_B beta, and thus beta =
&lt;br&gt;X_B^-1 mu = 0 are the hypotheses tested by the contrasts. Moreover, if, as
&lt;br&gt;in Helmert contrasts, the columns of X_B are orthogonal, then so are the
&lt;br&gt;rows of X_B^-1, and the latter are simply rescalings of the former. That
&lt;br&gt;allows one conveniently to code the hypotheses directly in X_B; all this is
&lt;br&gt;also explained in that section of my book, and is essentially what Peter D.
&lt;br&gt;told you. In R, contr.treatment and contr.SAS provide dummy-variable (0/1)
&lt;br&gt;coding of regressors, differing only in the selection of the reference
&lt;br&gt;level.
&lt;br&gt;&lt;br&gt;John
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Regards,
&lt;br&gt;&amp;gt; Peng
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Sun, Nov 8, 2009 at 6:17 PM, John Fox &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260084&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jfox@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; Dear Peng Yu,
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Perhaps you're referring to my text, Applied Linear Regression Analysis
&lt;br&gt;and
&lt;br&gt;&amp;gt; &amp;gt; Generalized Linear Models, since I seem to recall that you sent me a
&lt;br&gt;number
&lt;br&gt;&amp;gt; &amp;gt; of questions about it. See Section 9.1.2 on linear contrasts for the
&lt;br&gt;answer
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;gt; to your question.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I hope this helps,
&lt;br&gt;&amp;gt; &amp;gt;  John
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; --------------------------------
&lt;br&gt;&amp;gt; &amp;gt; John Fox
&lt;br&gt;&amp;gt; &amp;gt; Senator William McMaster
&lt;br&gt;&amp;gt; &amp;gt;  Professor of Social Statistics
&lt;br&gt;&amp;gt; &amp;gt; Department of Sociology
&lt;br&gt;&amp;gt; &amp;gt; McMaster University
&lt;br&gt;&amp;gt; &amp;gt; Hamilton, Ontario, Canada
&lt;br&gt;&amp;gt; &amp;gt; web: socserv.mcmaster.ca/jfox
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260084&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help-bounces@...&lt;/a&gt;
&lt;/div&gt;[mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260084&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help-bounces@...&lt;/a&gt;]
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;gt; On
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Behalf Of Peng Yu
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Sent: November-08-09 4:52 PM
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260084&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Subject: Re: [R] reference on contr.helmert and typo on its help page.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; On Sun, Nov 8, 2009 at 11:28 AM, Peter Dalgaard
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260084&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;p.dalgaard@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; Gabor Grothendieck wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; On Sun, Nov 8, 2009 at 11:59 AM, Peng Yu &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260084&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pengyu.ut@...&lt;/a&gt;&amp;gt;
&lt;/div&gt;wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; On Sun, Nov 8, 2009 at 10:11 AM, Duncan Murdoch
&lt;br&gt;&amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260084&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;murdoch@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; On 08/11/2009 11:03 AM, Peng Yu wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I'm wondering which textbook discussed the various contrast
&lt;br&gt;matrices
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; mentioned in the help page of 'contr.helmert'. Could somebody let
&lt;br&gt;me
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; know?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Doesn't the reference on that page discuss them?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; It does explain what the functions are. But I need a more basic and
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; complete reference. For example, I want to understand what 'Helmert
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; parametrization' (on page 33 of 'Statistical Models in S') is.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; Just google for: Helmert contrasts
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; Or,
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; contr.helmert(5)
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;  [,1] [,2] [,3] [,4]
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; 1   -1   -1   -1   -1
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; 2    1   -1   -1   -1
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; 3    0    2   -1   -1
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; 4    0    0    3   -1
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; 5    0    0    0    4
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;&amp;gt; MASS::fractions(MASS::ginv(contr.helmert(5)))
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;     [,1]  [,2]  [,3]  [,4]  [,5]
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; [1,]  -1/2   1/2     0     0     0
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; [2,]  -1/6  -1/6   1/3     0     0
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; [3,] -1/12 -1/12 -1/12   1/4     0
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; [4,] -1/20 -1/20 -1/20 -1/20   1/5
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; and apply brains.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt; I.e., except for a slightly odd multiplier, the parameters represent
&lt;/div&gt;the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &amp;gt;  difference between each level and the average of the preceding
&lt;br&gt;levels.
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; I realized that my questions are what a contrast matrix is and how it
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; is related to hypothesis testing. For a give hypothesis, how to get
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; the corresponding contrast matrix in a systematical way? There are
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; some online materials, but they are all diffused. I have also read the
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; book Applied Linear Regression Models, which doesn't give a complete
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; descriptions on all the aspects of contrast and contrast matrix. But I
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; would want a textbook that gives a complete description, so that I
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; don't have to look around for other materials.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260084&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; PLEASE do read the posting guide
&lt;br&gt;&amp;gt; &amp;gt; &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260084&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; PLEASE do read the posting guide
&lt;/div&gt;&lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26260084&amp;i=12&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/reference-on-contr.helmert-and-typo-on-its-help-page.-tp26255073p26260084.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26261076</id>
	<title>Re: Outputing multilple subsets</title>
	<published>2009-11-08T17:31:50Z</published>
	<updated>2009-11-08T17:31:50Z</updated>
	<author>
		<name>Johann Hibschman</name>
	</author>
	<content type="html">On Nov 8, 2009, at 7:23 PM, rusers.sh wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; for (i in num) &amp;nbsp;{
&lt;br&gt;&amp;gt; &amp;nbsp; c_num&amp;lt;-c[c$b==num,]
&lt;br&gt;&amp;gt; &amp;nbsp; write.csv(c_num,file=&amp;quot;c:/c_num.csv&amp;quot;)
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Warning messages:
&lt;br&gt;&amp;gt; 1: In c$b == num :
&lt;br&gt;&amp;gt; &amp;nbsp;longer object length is not a multiple of shorter object length
&lt;br&gt;&lt;br&gt;This is because you're comparing column b to the entire vector of &amp;nbsp;
&lt;br&gt;numbers (num), not the current number in the iteration (i). &amp;nbsp;The first &amp;nbsp;
&lt;br&gt;line of the loop should be &amp;quot;c_num&amp;lt;-c[c$b==i,]&amp;quot;.
&lt;br&gt;&lt;br&gt;&amp;nbsp;From a style point of view, I'd use &amp;quot;n&amp;quot; as my variable, since &amp;quot;i&amp;quot; is &amp;nbsp;
&lt;br&gt;too commonly used as an integer index.
&lt;br&gt;&lt;br&gt;Also, you will be overwriting the same file, called &amp;quot;c_num.csv&amp;quot;, on &amp;nbsp;
&lt;br&gt;each iteration.
&lt;br&gt;&lt;br&gt;You should try something more like:
&lt;br&gt;&lt;br&gt;for (n in num) {
&lt;br&gt;&amp;nbsp; &amp;nbsp;c.n &amp;lt;- c[c$b==n,]
&lt;br&gt;&amp;nbsp; &amp;nbsp;write.csv(c.n, file=paste(&amp;quot;c:/c_&amp;quot;, n, &amp;quot;.csv&amp;quot;, sep=&amp;quot;&amp;quot;)
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;I hope that helps.
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Johann Hibschman
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26261076&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Outputing-multilple-subsets-tp26259559p26261076.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26259879</id>
	<title>Re: Models for Discrete Choice in R</title>
	<published>2009-11-08T17:05:29Z</published>
	<updated>2009-11-08T17:05:29Z</updated>
	<author>
		<name>Frank E Harrell Jr</name>
	</author>
	<content type="html">Emmanuel Charpentier wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Le dimanche 08 novembre 2009 à 17:07 -0200, Iuri Gavronski a écrit :
&lt;br&gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I would like to fit Logit models for ordered data, such as those
&lt;br&gt;&amp;gt;&amp;gt; suggested by Greene (2003), p. 736.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Does anyone suggests any package in R for that?
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; look up the polr function in package MASS (and read the relevant pages
&lt;br&gt;&amp;gt; in V&amp;R4 and some quoted references...) or the slightly more
&lt;br&gt;&amp;gt; sophisticated (larger range of models) lrm function in F. Harrell's
&lt;br&gt;&amp;gt; Design (now rms) packge (but be aware that Design is a huge beast witch
&lt;br&gt;&amp;gt; carries its own &amp;quot;computing universe&amp;quot;, based on (strong) Harrell's view
&lt;br&gt;&amp;gt; of what a regression analysis should be : reading his book is, IMHO,
&lt;br&gt;&amp;gt; necessary to understand his choices and agree (or disgree) with them).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If you have a multilevel model (a. k. a. one &amp;quot;random effect&amp;quot; grouping),
&lt;br&gt;&amp;gt; the &amp;quot;repolr&amp;quot; packge aims at that, but I've been unable to use it
&lt;br&gt;&amp;gt; recently (numerical exceptions).
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; By the way, my dependent variable is ordinal and my independent
&lt;br&gt;&amp;gt;&amp;gt; variables are ratio/intervalar.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Numeric ? Then maybe some recoding/transformation is in order ... in
&lt;br&gt;&amp;gt; which case Design/rms might or might not be useful.
&lt;/div&gt;&lt;br&gt;I'm not clear on what recoding or transformation is needed for an 
&lt;br&gt;ordinal dependent variable and ratio/interval independent variables, nor 
&lt;br&gt;why rms/Design would not be useful.
&lt;br&gt;&lt;br&gt;Frank
&lt;br&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; HTH,
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 					Emmanuel Charpentier
&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Frank E Harrell Jr &amp;nbsp; Professor and Chair &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; School of Medicine
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Department of Biostatistics &amp;nbsp; Vanderbilt University
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259879&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Models-for-Discrete-Choice-in-R-tp26256842p26259879.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26259791</id>
	<title>Re: Outputing multilple subsets</title>
	<published>2009-11-08T16:53:31Z</published>
	<updated>2009-11-08T16:53:31Z</updated>
	<author>
		<name>Ista Zahn</name>
	</author>
	<content type="html">Have you considered using split?
&lt;br&gt;&lt;br&gt;-Ista
&lt;br&gt;&lt;br&gt;On Sun, Nov 8, 2009 at 7:23 PM, rusers.sh &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259791&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;rusers.sh@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Hi Rusers,
&lt;br&gt;&amp;gt;  I hope to divide the original dataset into several subsets and output
&lt;br&gt;&amp;gt; these multilple datasets. But errors appeared in my loops. See example.
&lt;br&gt;&amp;gt; ######
&lt;br&gt;&amp;gt; a&amp;lt;-c(1:10)
&lt;br&gt;&amp;gt; b&amp;lt;-c(rep(1,3),rep(2,3),rep(3,4))
&lt;br&gt;&amp;gt; c&amp;lt;-data.frame(a,b)  #c is the example data
&lt;br&gt;&amp;gt; num&amp;lt;-c(unique(b))
&lt;br&gt;&amp;gt; # I hope to get the subsets c_1.csv,c_2.csv and c_3.csv
&lt;br&gt;&amp;gt; #Errors
&lt;br&gt;&amp;gt; for (i in num)  {
&lt;br&gt;&amp;gt;   c_num&amp;lt;-c[c$b==num,]
&lt;br&gt;&amp;gt;   write.csv(c_num,file=&amp;quot;c:/c_num.csv&amp;quot;)
&lt;br&gt;&amp;gt; }
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Warning messages:
&lt;br&gt;&amp;gt; 1: In c$b == num :
&lt;br&gt;&amp;gt;  longer object length is not a multiple of shorter object length
&lt;br&gt;&amp;gt; 2: In c$b == num :
&lt;br&gt;&amp;gt;  longer object length is not a multiple of shorter object length
&lt;br&gt;&amp;gt; 3: In c$b == num :
&lt;br&gt;&amp;gt;  longer object length is not a multiple of shorter object length
&lt;br&gt;&amp;gt;  I think the problem should be file=&amp;quot;c:/c_num.csv&amp;quot;, anybody has ever met
&lt;br&gt;&amp;gt; this problem?
&lt;br&gt;&amp;gt;  Thanks very much.
&lt;br&gt;&amp;gt; -----------------
&lt;br&gt;&amp;gt; Jane Chang
&lt;br&gt;&amp;gt; Queen's
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;        [[alternative HTML version deleted]]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259791&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Ista Zahn
&lt;br&gt;Graduate student
&lt;br&gt;University of Rochester
&lt;br&gt;Department of Clinical and Social Psychology
&lt;br&gt;&lt;a href=&quot;http://yourpsyche.org&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://yourpsyche.org&lt;/a&gt;&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259791&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Outputing-multilple-subsets-tp26259559p26259791.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26259712</id>
	<title>Re: Simple 2-Way Anova issue in R</title>
	<published>2009-11-08T16:42:45Z</published>
	<updated>2009-11-08T16:42:45Z</updated>
	<author>
		<name>jholtman</name>
	</author>
	<content type="html">&amp;gt; x
&lt;br&gt;&amp;nbsp; Year Depth Biomass1 Biomass2
&lt;br&gt;1 1999 &amp;nbsp; &amp;nbsp;10 &amp;nbsp; &amp;nbsp; 14.3 &amp;nbsp; &amp;nbsp; 14.7
&lt;br&gt;2 1999 &amp;nbsp; &amp;nbsp;15 &amp;nbsp; &amp;nbsp; 14.7 &amp;nbsp; &amp;nbsp; 15.6
&lt;br&gt;&amp;gt; require(reshape)
&lt;br&gt;&amp;gt; melt(x, id=c('Year','Depth'))
&lt;br&gt;&amp;nbsp; Year Depth variable value
&lt;br&gt;1 1999 &amp;nbsp; &amp;nbsp;10 Biomass1 &amp;nbsp;14.3
&lt;br&gt;2 1999 &amp;nbsp; &amp;nbsp;15 Biomass1 &amp;nbsp;14.7
&lt;br&gt;3 1999 &amp;nbsp; &amp;nbsp;10 Biomass2 &amp;nbsp;14.7
&lt;br&gt;4 1999 &amp;nbsp; &amp;nbsp;15 Biomass2 &amp;nbsp;15.6
&lt;br&gt;&lt;br&gt;&lt;br&gt;On Sun, Nov 8, 2009 at 7:38 PM, znd &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259712&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;zackdaugherty@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Ah, I believe I constructed my *.csv wrong in that I only had 1 observation
&lt;br&gt;&amp;gt; within groups whereas I needed at least 2.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Originally I had:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Year     Depth     Biomass1     Biomass2
&lt;br&gt;&amp;gt; 1999     10         14.3           14.7
&lt;br&gt;&amp;gt; 1999     15         14.7           15.6
&lt;br&gt;&amp;gt; etc.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; but I switched this to:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Year     Depth     Biomass
&lt;br&gt;&amp;gt; 1999     10         14.3
&lt;br&gt;&amp;gt; 1999     10         14.7
&lt;br&gt;&amp;gt; 1999     15         15.1
&lt;br&gt;&amp;gt; 1999     15         15.6
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I believe this may be the appropriate way to collapse my biomass data in
&lt;br&gt;&amp;gt; order to perform a 2-way anova.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If not feel free comment and thanks for the help.
&lt;br&gt;&amp;gt; --
&lt;br&gt;&amp;gt; View this message in context: &lt;a href=&quot;http://old.nabble.com/Simple-2-Way-Anova-issue-in-R-tp26258684p26259649.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Simple-2-Way-Anova-issue-in-R-tp26258684p26259649.html&lt;/a&gt;&lt;br&gt;&amp;gt; Sent from the R help mailing list archive at Nabble.com.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259712&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Jim Holtman
&lt;br&gt;Cincinnati, OH
&lt;br&gt;+1 513 646 9390
&lt;br&gt;&lt;br&gt;What is the problem that you are trying to solve?
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259712&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Simple-2-Way-Anova-issue-in-R-tp26258684p26259712.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26259685</id>
	<title>Re: reference on contr.helmert and typo on its help page.</title>
	<published>2009-11-08T16:41:15Z</published>
	<updated>2009-11-08T16:41:15Z</updated>
	<author>
		<name>Peng Yu</name>
	</author>
	<content type="html">Dear John,
&lt;br&gt;&lt;br&gt;I did read Section 9.1.2 and various other textbooks before posting my
&lt;br&gt;questions. But each reference uses slightly different notations and
&lt;br&gt;terminology. I get confused and would like a description that
&lt;br&gt;summaries everything so that I don't have to refer to many different
&lt;br&gt;resources. May I ask a few questions on the section in your textbook?
&lt;br&gt;&lt;br&gt;Which variable in Section 9.1.2 is &amp;quot;a matrix of contrasts&amp;quot; mentioned
&lt;br&gt;in the help page of 'contr.helmert'? Which matrix of contrast in R
&lt;br&gt;corresponds to dummy regression? With different R formula, e.g. y ~ x
&lt;br&gt;vs. y ~ x -1, $X_F$ (mentioned on page 189) is different and hence
&lt;br&gt;$\beta_F$ (mentioned in eq. 9.3) is be different. So my understanding
&lt;br&gt;is that the matrix of contrast should depend on the formula. But it is
&lt;br&gt;not according to the help page of &amp;quot;contr.helmert&amp;quot;.
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Peng
&lt;br&gt;&lt;br&gt;On Sun, Nov 8, 2009 at 6:17 PM, John Fox &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259685&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;jfox@...&lt;/a&gt;&amp;gt; wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Dear Peng Yu,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Perhaps you're referring to my text, Applied Linear Regression Analysis and
&lt;br&gt;&amp;gt; Generalized Linear Models, since I seem to recall that you sent me a number
&lt;br&gt;&amp;gt; of questions about it. See Section 9.1.2 on linear contrasts for the answer
&lt;br&gt;&amp;gt; to your question.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I hope this helps,
&lt;br&gt;&amp;gt;  John
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; --------------------------------
&lt;br&gt;&amp;gt; John Fox
&lt;br&gt;&amp;gt; Senator William McMaster
&lt;br&gt;&amp;gt;  Professor of Social Statistics
&lt;br&gt;&amp;gt; Department of Sociology
&lt;br&gt;&amp;gt; McMaster University
&lt;br&gt;&amp;gt; Hamilton, Ontario, Canada
&lt;br&gt;&amp;gt; web: socserv.mcmaster.ca/jfox
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259685&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259685&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help-bounces@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; On
&lt;br&gt;&amp;gt;&amp;gt; Behalf Of Peng Yu
&lt;br&gt;&amp;gt;&amp;gt; Sent: November-08-09 4:52 PM
&lt;br&gt;&amp;gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259685&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; Subject: Re: [R] reference on contr.helmert and typo on its help page.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Sun, Nov 8, 2009 at 11:28 AM, Peter Dalgaard
&lt;br&gt;&amp;gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259685&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;p.dalgaard@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Gabor Grothendieck wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; On Sun, Nov 8, 2009 at 11:59 AM, Peng Yu &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259685&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pengyu.ut@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; On Sun, Nov 8, 2009 at 10:11 AM, Duncan Murdoch &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259685&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;murdoch@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; On 08/11/2009 11:03 AM, Peng Yu wrote:
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I'm wondering which textbook discussed the various contrast matrices
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; mentioned in the help page of 'contr.helmert'. Could somebody let me
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; know?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Doesn't the reference on that page discuss them?
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; It does explain what the functions are. But I need a more basic and
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; complete reference. For example, I want to understand what 'Helmert
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; parametrization' (on page 33 of 'Statistical Models in S') is.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; Just google for: Helmert contrasts
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; Or,
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; contr.helmert(5)
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;  [,1] [,2] [,3] [,4]
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; 1   -1   -1   -1   -1
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; 2    1   -1   -1   -1
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; 3    0    2   -1   -1
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; 4    0    0    3   -1
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; 5    0    0    0    4
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;&amp;gt; MASS::fractions(MASS::ginv(contr.helmert(5)))
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;     [,1]  [,2]  [,3]  [,4]  [,5]
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; [1,]  -1/2   1/2     0     0     0
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; [2,]  -1/6  -1/6   1/3     0     0
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; [3,] -1/12 -1/12 -1/12   1/4     0
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; [4,] -1/20 -1/20 -1/20 -1/20   1/5
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; and apply brains.
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt; I.e., except for a slightly odd multiplier, the parameters represent the
&lt;br&gt;&amp;gt;&amp;gt; &amp;gt;  difference between each level and the average of the preceding levels.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I realized that my questions are what a contrast matrix is and how it
&lt;br&gt;&amp;gt;&amp;gt; is related to hypothesis testing. For a give hypothesis, how to get
&lt;br&gt;&amp;gt;&amp;gt; the corresponding contrast matrix in a systematical way? There are
&lt;br&gt;&amp;gt;&amp;gt; some online materials, but they are all diffused. I have also read the
&lt;br&gt;&amp;gt;&amp;gt; book Applied Linear Regression Models, which doesn't give a complete
&lt;br&gt;&amp;gt;&amp;gt; descriptions on all the aspects of contrast and contrast matrix. But I
&lt;br&gt;&amp;gt;&amp;gt; would want a textbook that gives a complete description, so that I
&lt;br&gt;&amp;gt;&amp;gt; don't have to look around for other materials.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259685&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; PLEASE do read the posting guide
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259685&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/reference-on-contr.helmert-and-typo-on-its-help-page.-tp26255073p26259685.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26259649</id>
	<title>Re: Simple 2-Way Anova issue in R</title>
	<published>2009-11-08T16:38:15Z</published>
	<updated>2009-11-08T16:38:15Z</updated>
	<author>
		<name>znd</name>
	</author>
	<content type="html">Ah, I believe I constructed my *.csv wrong in that I only had 1 observation within groups whereas I needed at least 2.
&lt;br&gt;&lt;br&gt;Originally I had:
&lt;br&gt;&lt;br&gt;Year &amp;nbsp; &amp;nbsp; Depth &amp;nbsp; &amp;nbsp; Biomass1 &amp;nbsp; &amp;nbsp; Biomass2
&lt;br&gt;1999 &amp;nbsp; &amp;nbsp; 10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 14.3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 14.7
&lt;br&gt;1999 &amp;nbsp; &amp;nbsp; 15 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 14.7 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15.6
&lt;br&gt;etc.
&lt;br&gt;&lt;br&gt;but I switched this to:
&lt;br&gt;&lt;br&gt;Year &amp;nbsp; &amp;nbsp; Depth &amp;nbsp; &amp;nbsp; Biomass
&lt;br&gt;1999 &amp;nbsp; &amp;nbsp; 10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 14.3
&lt;br&gt;1999 &amp;nbsp; &amp;nbsp; 10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 14.7
&lt;br&gt;1999 &amp;nbsp; &amp;nbsp; 15 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15.1
&lt;br&gt;1999 &amp;nbsp; &amp;nbsp; 15 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 15.6
&lt;br&gt;&lt;br&gt;I believe this may be the appropriate way to collapse my biomass data in order to perform a 2-way anova.
&lt;br&gt;&lt;br&gt;If not feel free comment and thanks for the help.&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Simple-2-Way-Anova-issue-in-R-tp26258684p26259649.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26259559</id>
	<title>Outputing multilple subsets</title>
	<published>2009-11-08T16:23:43Z</published>
	<updated>2009-11-08T16:23:43Z</updated>
	<author>
		<name>zhijie zhang-2</name>
	</author>
	<content type="html">Hi Rusers,
&lt;br&gt;&amp;nbsp; I hope to divide the original dataset into several subsets and output
&lt;br&gt;these multilple datasets. But errors appeared in my loops. See example.
&lt;br&gt;######
&lt;br&gt;a&amp;lt;-c(1:10)
&lt;br&gt;b&amp;lt;-c(rep(1,3),rep(2,3),rep(3,4))
&lt;br&gt;c&amp;lt;-data.frame(a,b) &amp;nbsp;#c is the example data
&lt;br&gt;num&amp;lt;-c(unique(b))
&lt;br&gt;# I hope to get the subsets c_1.csv,c_2.csv and c_3.csv
&lt;br&gt;#Errors
&lt;br&gt;for (i in num) &amp;nbsp;{
&lt;br&gt;&amp;nbsp; &amp;nbsp;c_num&amp;lt;-c[c$b==num,]
&lt;br&gt;&amp;nbsp; &amp;nbsp;write.csv(c_num,file=&amp;quot;c:/c_num.csv&amp;quot;)
&lt;br&gt;}
&lt;br&gt;&lt;br&gt;Warning messages:
&lt;br&gt;1: In c$b == num :
&lt;br&gt;&amp;nbsp; longer object length is not a multiple of shorter object length
&lt;br&gt;2: In c$b == num :
&lt;br&gt;&amp;nbsp; longer object length is not a multiple of shorter object length
&lt;br&gt;3: In c$b == num :
&lt;br&gt;&amp;nbsp; longer object length is not a multiple of shorter object length
&lt;br&gt;&amp;nbsp; I think the problem should be file=&amp;quot;c:/c_num.csv&amp;quot;, anybody has ever met
&lt;br&gt;this problem?
&lt;br&gt;&amp;nbsp; Thanks very much.
&lt;br&gt;-----------------
&lt;br&gt;Jane Chang
&lt;br&gt;Queen's
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; [[alternative HTML version deleted]]
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259559&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Outputing-multilple-subsets-tp26259559p26259559.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26259522</id>
	<title>Re: reference on contr.helmert and typo on its help page.</title>
	<published>2009-11-08T16:17:59Z</published>
	<updated>2009-11-08T16:17:59Z</updated>
	<author>
		<name>John Fox-6</name>
	</author>
	<content type="html">Dear Peng Yu,
&lt;br&gt;&lt;br&gt;Perhaps you're referring to my text, Applied Linear Regression Analysis and
&lt;br&gt;Generalized Linear Models, since I seem to recall that you sent me a number
&lt;br&gt;of questions about it. See Section 9.1.2 on linear contrasts for the answer
&lt;br&gt;to your question.
&lt;br&gt;&lt;br&gt;I hope this helps,
&lt;br&gt;&amp;nbsp;John
&lt;br&gt;&lt;br&gt;--------------------------------
&lt;br&gt;John Fox
&lt;br&gt;Senator William McMaster 
&lt;br&gt;&amp;nbsp; Professor of Social Statistics
&lt;br&gt;Department of Sociology
&lt;br&gt;McMaster University
&lt;br&gt;Hamilton, Ontario, Canada
&lt;br&gt;web: socserv.mcmaster.ca/jfox
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt; From: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259522&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help-bounces@...&lt;/a&gt; [mailto:&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259522&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help-bounces@...&lt;/a&gt;]
&lt;br&gt;On
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Behalf Of Peng Yu
&lt;br&gt;&amp;gt; Sent: November-08-09 4:52 PM
&lt;br&gt;&amp;gt; To: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259522&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: Re: [R] reference on contr.helmert and typo on its help page.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Sun, Nov 8, 2009 at 11:28 AM, Peter Dalgaard
&lt;br&gt;&amp;gt; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259522&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;p.dalgaard@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt; Gabor Grothendieck wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; On Sun, Nov 8, 2009 at 11:59 AM, Peng Yu &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259522&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pengyu.ut@...&lt;/a&gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; On Sun, Nov 8, 2009 at 10:11 AM, Duncan Murdoch &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259522&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;murdoch@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; On 08/11/2009 11:03 AM, Peng Yu wrote:
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I'm wondering which textbook discussed the various contrast matrices
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; mentioned in the help page of 'contr.helmert'. Could somebody let me
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; know?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;&amp;gt; Doesn't the reference on that page discuss them?
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; It does explain what the functions are. But I need a more basic and
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; complete reference. For example, I want to understand what 'Helmert
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt; parametrization' (on page 33 of 'Statistical Models in S') is.
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; Just google for: Helmert contrasts
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; Or,
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; contr.helmert(5)
&lt;br&gt;&amp;gt; &amp;gt;  [,1] [,2] [,3] [,4]
&lt;br&gt;&amp;gt; &amp;gt; 1   -1   -1   -1   -1
&lt;br&gt;&amp;gt; &amp;gt; 2    1   -1   -1   -1
&lt;br&gt;&amp;gt; &amp;gt; 3    0    2   -1   -1
&lt;br&gt;&amp;gt; &amp;gt; 4    0    0    3   -1
&lt;br&gt;&amp;gt; &amp;gt; 5    0    0    0    4
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt;&amp;gt; MASS::fractions(MASS::ginv(contr.helmert(5)))
&lt;br&gt;&amp;gt; &amp;gt;     [,1]  [,2]  [,3]  [,4]  [,5]
&lt;br&gt;&amp;gt; &amp;gt; [1,]  -1/2   1/2     0     0     0
&lt;br&gt;&amp;gt; &amp;gt; [2,]  -1/6  -1/6   1/3     0     0
&lt;br&gt;&amp;gt; &amp;gt; [3,] -1/12 -1/12 -1/12   1/4     0
&lt;br&gt;&amp;gt; &amp;gt; [4,] -1/20 -1/20 -1/20 -1/20   1/5
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; and apply brains.
&lt;br&gt;&amp;gt; &amp;gt;
&lt;br&gt;&amp;gt; &amp;gt; I.e., except for a slightly odd multiplier, the parameters represent the
&lt;br&gt;&amp;gt; &amp;gt;  difference between each level and the average of the preceding levels.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I realized that my questions are what a contrast matrix is and how it
&lt;br&gt;&amp;gt; is related to hypothesis testing. For a give hypothesis, how to get
&lt;br&gt;&amp;gt; the corresponding contrast matrix in a systematical way? There are
&lt;br&gt;&amp;gt; some online materials, but they are all diffused. I have also read the
&lt;br&gt;&amp;gt; book Applied Linear Regression Models, which doesn't give a complete
&lt;br&gt;&amp;gt; descriptions on all the aspects of contrast and contrast matrix. But I
&lt;br&gt;&amp;gt; would want a textbook that gives a complete description, so that I
&lt;br&gt;&amp;gt; don't have to look around for other materials.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259522&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; PLEASE do read the posting guide
&lt;/div&gt;&lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26259522&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;and provide commented, minimal, self-contained, reproducible code.
&lt;br&gt;&lt;p&gt;From forum: &lt;a href=&quot;http://old.nabble.com/R-help-f13820.html&quot; embed=&quot;fixTarget[13820]&quot; target=&quot;_top&quot; &gt;R help&lt;/a&gt;&lt;/p&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/reference-on-contr.helmert-and-typo-on-its-help-page.-tp26255073p26259522.html" />
</entry>

</feed>
