smcp.shar (was [R] linking object files)

Clive Loader clive at
Mon Aug 23 21:40:48 CEST 1999

I've been out of town, and too hastily deleted some earlier messages
from this thread....

> > > Dear friends. I would like to link an object file made in C.
> > Dyn.load rather wants to link a whole library and I only wanted to
> > link this small object file. I followed instructions given for S -
> > by Clive Loader in his software for changepoint handling and
> > it is his object file I made from
> >
That url should work. The smcp.shar archive was specific for simulations
in an Ann.Stat. paper a couple of years ago, and the interface would need
rewriting to work on other data. I haven't tried running in R.

The methods can be implemented with locfit, using left and right smooths. 
This example uses the penny thickness data (from Scott, Multivariate Density
Estimation, p234,276):

> midp <- (1945:1988)+0.5
> fitl <- locfit(thickness~left(year), data=penny,alpha=c(0,10),deg=1,ev=midp)
> fitr <- locfit(thickness~right(year),data=penny,alpha=c(0,10),deg=1,ev=midp)

To plot Delta-hat(t)^2 in S+ 5.0,

> plot((preplot(fitr)-preplot(fitl))^2, type="b")

In R, that would have to be

> pr <- knots(fitr,what="coef")
> pl <- knots(fitl,what="coef")
> plot(midp,(pr-pl)^2,type="b")

(when I package my current version of locfit, it allows the user to specify
 a set of basis functions, so all this can be done with one fit).

r-help mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at

More information about the R-help mailing list