From pchausse at uwaterloo.ca  Tue Nov 30 19:57:17 2010
From: pchausse at uwaterloo.ca (Pierre Chausse)
Date: Tue, 30 Nov 2010 13:57:17 -0500
Subject: [Rd] stats::kernel
In-Reply-To: <alpine.LFD.2.00.1011301748550.22358@gannet.stats.ox.ac.uk>
References: <4CF52FCE.80606@uwaterloo.ca>
	<alpine.LFD.2.00.1011301748550.22358@gannet.stats.ox.ac.uk>
Message-ID: <4CF5490D.5010800@uwaterloo.ca>

  Thanks.

It is true that I can set m manually. I just thought that since the 
default depended on the length of coef that it was setting it right when 
coef was a vector. Since when the coef is a name, the default is always 
2, the following modification would make the job.


kernel <- function (coef, m = ifelse(is.character(coef), 2, length(coef) 
- 1), r, name = "unknown")

best regards.


*Pierre Chausse*
Assistant Professor
Department of Economics
University of Waterloo



[Rd] stats::kernel
Pierre Chausse