fork(1) download
  1. library(SuppDists)
  2. jdist<-list(gamma=-0.7, delta=0.8, xi=26, lambda=1.4, type="SU")
  3. xvals<-seq(10,60,by=1)
  4. yvals<-dJohnson(xvals,jdist)
  5. summary(jdist)
  6. #plot(xvals,yvals,col="blue",type="l")
  7.  
  8. #this is some trial observation - say we see an observation of "40" and give it a weighting of one-third
  9. observation<-40
  10. observationweight<-1/3
  11.  
  12. #your code here - modifies jdist for example
  13. observationnumber<-100/observationweight
  14. randomobservations<-rJohnson(observationnumber, jdist)
  15. jdist<-JohnsonFit(randomobservations)
  16. #
  17.  
  18. xvals<-seq(10,60,by=1)
  19. yvals<-dJohnson(xvals,jdist)
  20. summary(jdist)
  21. #lines(xvals,yvals,col="red")
Success #stdin #stdout 0.35s 24104KB
stdin
Standard input is empty
stdout
       Length Class  Mode     
gamma  1      -none- numeric  
delta  1      -none- numeric  
xi     1      -none- numeric  
lambda 1      -none- numeric  
type   1      -none- character
       Length Class  Mode     
gamma  1      -none- numeric  
delta  1      -none- numeric  
xi     1      -none- numeric  
lambda 1      -none- numeric  
type   1      -none- character