## Model data frame generation
  a <- data.frame(x=seq(1, 30)+rnorm(mean=0, sd=1, n=30),
                  y=seq(1, 30)*rnorm(mean=1, sd=0.4, n=30))
  ## Call to PBreg
  x <- PBreg(a)
  print(x)
  par(mfrow=c(2,2))
  plot(x, s=1:4)
  ## A real data example
  data(milk)
  milk <- Meth(milk)
  summary(milk)
  PBmilk <- PBreg(milk)
  par(mfrow=c(2,2))
  plot(PBmilk, s=1:4)
Run the code above in your browser using DataLab