Displaying 9 results from an estimated 9 matches for "fitfunct".
Did you mean:
fitfunc
2012 Dec 06
1
scope, lme, ns, nlme, splines
...only in the
degrees of freedom of a ns() spline. I want to use a wrapper function to do
this. The models will be of the form
y ~ ns(x, df=splineDF)
where splineDF is passed as an argument to a wrapper function.
This works fine if the regression function is lm(). But with lme(),
I get an error. fitfunction() below demonstrates this.
Why?
KLUDGEfit() below provides a clumsy solution. It turns the lme()
command, along with the appropriate value of splineDF, into a text
string and then uses eval(parse(text=mystring)). But is there not a
more elegant solution?
set.seed(5)
junk<-data.frame(x=rno...
2012 Jul 02
1
Fitting and Plotting the fitted distributions
...d allow me easier fit fast many distributions and check which of the fits performs better. My sample code (that you can of course execute it looks like that)
distrList<-list( "exponential", "geometric", "log-normal", "normal",
"Poisson")
fitfunction<-function(Type,x){
return (list(Type,(fitdistr(x,Type))))
}
require(MASS)
On<-round(abs(rnorm(10000,sd=100))+5,digits=0)
storeOn<-lapply(distrList,fitdistr,x=On)
plot(ecdf(On))
str(storeOn)
what I am looking now is to plot with the initial dataset plot(ecdf(On)) all the fitted d...
2009 Feb 05
4
See source code for survplot function in Design package
Dear R users,
I know one way to see the code for a hidden function, say function_x,
is using default.function_x (e.g. summary.default). But how can I see
the code for imported packages that have no namespace (in this case
Design)?
Many Thanks
Eleni
2009 Jul 24
1
Fwd: Making rq and bootcov play nice
John,
You can make a local version of bootcov which either:
deletes these arguments from the call to fitter, or
modify the switch statement to include rq.fit,
the latter would need to also modify rq() to return a fitFunction
component, so the first option is simpler. One of these days I'll
incorporate clustered se's into summary.rq, but meanwhile
this seems to be a good alternative.
Roger
url: www.econ.uiuc.edu/~roger Roger Koenker
email rkoenker at uiuc.edu Department of Econ...
2011 May 24
1
Loading an S object into R
...gestions on how to get this (what I assume is) data from the .f file into R?
Benjamin
S data
.Data class
8 ?- ? coefficients var loglik score iter linear.predictors residuals means terms n call Design assign na.action fail non.slopes stats method maxtime time.inc units fitFunction center scale.pred x y time surv std.err surv.summary ,
? ? ? ? K [ c g d` a? ?? ?? (? -? ?? ?? ;?...
2005 Mar 02
1
Rounding parameter values in genoud(), Rgenoud package
I would like to limit the significant figures of the calibrated
parameters determined by genoud() in the Rgenoud package. Below is some
example output, where column 1 is model run number, columns 2-7 are the
parameter values, and columns 8-12 are model fit statistics. I would
like genoud to internally limit parameters to 4 decimal places as shown
in this output. It is clear that the function is
2012 Aug 09
4
debug vs regular mode
Dear all,
I had a R segmentation fault, and then invoked debug mode and ran step
by step.
When I reached "terms(Y~X1*X2*...*X16)", I would then have
"segmentation" fault. However, if I just ran this under regular "R
interactive" mode, it would be fine though taking long time.
My questions are:
1. Is there a known limit of terms for a formula?
2. Why does the
2012 Aug 09
4
debug vs regular mode
Dear all,
I had a R segmentation fault, and then invoked debug mode and ran step
by step.
When I reached "terms(Y~X1*X2*...*X16)", I would then have
"segmentation" fault. However, if I just ran this under regular "R
interactive" mode, it would be fine though taking long time.
My questions are:
1. Is there a known limit of terms for a formula?
2. Why does the
2008 Nov 03
0
NaN causes "error in fitter" with cph.calibrate from pkg Design
...8426 10590 16
0 ...
..- attr(*, "names")= chr [1:8] "Obs" "Events" "Model L.R." "d.f." ...
$ method : chr "efron"
$ maxtime : num 9.95
$ time.inc : num 1
$ units : chr "Day"
$ fitFunction : chr [1:2] "cph" "coxph"
$ center : num 0.82
$ scale.pred : chr [1:2] "log Relative Hazard" "Hazard Ratio"
$ x : num [1:886393, 1:16] 35.1 27.0 56.4 22.5 56.0 ...
..- attr(*, "dimnames")=List of 2
.. ..$ :...