Guest User

Untitled

a guest
Jan 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. n=44467
  2. argvals=data_totale$temps_ref_st
  3.  
  4. library(fda)
  5. TableGCV<-c()
  6.  
  7. i is the number of basis
  8. j lambda for penalization (here =0)
  9.  
  10. for (i in c(800)) {
  11. for (j in c(0)) {
  12. basisobj = create.bspline.basis(c(0, max(argvals)),i)
  13.  
  14. fdParobj = fdPar(fdobj=basisobj, Lfdobj=2, j)
  15.  
  16. smoothlist = smooth.basis(argvals, mdata, fdParobj)
  17.  
  18. xfd_acc = smoothlist$fd
  19. xfd_acc_coef = smoothlist$fd$coefs
  20.  
  21. #GCV output
  22. gcv = smoothlist$gcv
  23. TableGCV <- rbind(TableGCV,c(i,j,gcv))
  24.  
  25. }
  26. }
Add Comment
Please, Sign In to add comment