Nothing
## MRRw3pxy.r
## This is a wrapper function intended only for testing the MRRw3pXonY function in the
## compiled shared library in package pivotals.
## A bit of flexibility was added to permit more casual input of data, with correct
## entry of arguments generated for MRRw3pXonY()
##
## (C) David Silkworth 2013
##
## This program is free software; you can redistribute it and/or modify it
## under the terms of the GNU General Public License as published by the
## Free Software Foundation; either version 2, or (at your option) any
## later version.
##
## These functions are distributed in the hope that they will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
##
## You should have received a copy of the GNU General Public License
## along with this program; if not, a copy is available at
## http://www.r-project.org/Licenses/
##
## This function is consistent with The Weibull Handbook, Fifth Edition and SuperSMITH software.
MRRw3pxy<-function(x,s=NULL,limit=10^-5) {
if(missing(s)) {
## this is simply a complete failure set
data<-sort(x)
event<-rep(1,length(x))
}else{
## suspension data has been provided
data<-c(x,s)
event<-c(rep(1,length(x)),rep(0,length(s)))
prep_df<-data.frame(data=data,event=event)
## now sort the dataframe on data values
NDX<-order(prep_df[,1])
prep_df<-prep_df[NDX,]
data<-prep_df$data
event<-prep_df$event
}
Weibull<-.Call("MRRw3pXonY", data, event, limit, PACKAGE= "pivotals")
## perhaps a future output would be more friendly
## outputDF<-data.frame(Weibull)
## DFrows<-c("Eta","Beta","Rsquared")
## row.names(outputDF)<-DFrows
## outputDF
## but for testing purposes just the vector from MRRw2pXonY is needed
Weibull
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.