Re: [R] Help needed!

From: Peter Ehlers <ehlers_at_ucalgary.ca>
Date: Wed, 20 Apr 2011 21:25:23 -0700

On 2011-04-20 14:33, Shuangyan Xiong wrote:
> Hi everyone,
>
> I have a question. Now I am reading the resource code of the package
> "ssfcov". The resource code is as following. I cannot find the resource
> code of the function "myss2d" anywhere in the package. Can anyone give
> me a hint how to find it in the package. Thanks a lot!!bv
>
>
> > ssfcov
> function (time, x, subject, nbasis = 5, centered = FALSE, noDiag = TRUE)
> {
> if (!centered) {
> fit<- smooth.spline(time, x)
> x<- x - fitted(fit)
> }
> gg<- NULL
> for (zz in unique(subject)) {
> if (sum(subject == zz)> 1) {
> tt<- time[subject == zz]
> xx<- x[subject == zz]
> g<- expand.grid(t1 = tt, t2 = tt)
> scov<- xx %*% t(xx)
> if (noDiag)
> scov<- scov + diag(rep(Inf, length(xx)))
> g$z<- matrix(scov, ncol = 1)
> gg<- rbind(gg, g[g$z< Inf, ])
> }
> }
> nobs<- nrow(gg)
> tt<- min(time) + (max(time) - min(time)) * (1:nbasis)/(nbasis +
> 1)
> g<- expand.grid(t1 = tt, t2 = tt)
> g$z<- 0
> gg<- rbind(gg, g)
> fit<- myss2d(z ~ t1 * t2, data = gg, id.basis = ((nobs +
> 1):(nobs + nbasis * nbasis)))
> class(fit)<- "rfcovObj"
> return(fit)
> }
> <environment: namespace:ssfcov>

Maybe I'm just slow tonight, but where did you get that package? I can't see on CRAN or R-Forge.

You might also consider a more informative subject line. "Help needed" is true for all questions (not answers) on R-help. Just think, why is this list called R-***help***?

Peter Ehlers

>
>
> Best,
> Shuangyan
> >
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu 21 Apr 2011 - 04:30:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 25 Apr 2011 - 20:20:37 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive