similar to: Building a plotmath string in a function

Displaying 20 results from an estimated 600 matches similar to: "Building a plotmath string in a function"

2010 Feb 02
2
character variables in substitute()
In trying to create a plotmath expression for plot labeling, such as R = 6, beta = 15 where I want beta to be the Greek beta and, possibly, R in italics (like one would get in an explicit expression. The reason for this is that I want to write a string builder function that takes vectors of variable names and their values and return a plotmath expression for labeling a plot. One approach I
2005 Oct 23
1
Coloring leaves, twigs and labels in plot.dendrogram()
Core developers, I couldn't find any simple way to send a vector of colors to apply to each terminal in plot.dendrogram() or plot.hclust()---I asked R-help about it a few weeks ago and didn't get any response---so I hacked that functionality into the plot.dendrgram code (see below for hacked function plus examples).... Is there any chance this functionality could be added to the
2002 Feb 11
0
profile
I am running 1.3.1 on a Windows (NT 4.0) machine. I've fit a nonlinear model intended to predict crop yield from nutrient information, and want to use the profile function. If I type say, profile(simparj.fm) I get the following error message: "Error in prof$getProfile(): number of iterations exceeded maximum of 5.25515e-308" I used the profiler function to profile simparj,fm step
2013 Mar 13
0
SR-IOV vs nPAR
Hi, (Already asked this on the intel wired forum: http://communities.intel.com/message/185413#185413 but some of those questiones are XEN specific, which might be why theres no response ;-) I have doubts if SR-IOV will provide the required features compared to nPAR. SR-IOV seems more flexible, but I''m not sure if performance and features are the same as nPAR. Servers will be Dell M620
2003 Feb 07
0
confint.lm in MASS
I don't know if this has already come up in the list or elsewhere - a quick search did't show anything relevant - but I think it's worth of mention. The confint.lm function in package MASS doesn't work correctly when called on a subset of parameters. The bug, easy to fix, is that confidence intervals are computed for all parameters anyway, and then assigned to a matrix which is too
2008 Dec 19
0
"parm" argument in confint.multinom () nnet package
Dear R users, The nnet package includes the multinom method for the confint function. The R Help file (?confint) for the generic function in the stats package and the help files for the glm and nls methods in the MASS package indicate that one can use the "parm" argument as "a specification of which parameters are to be given confidence intervals, either a vector of numbers or
2005 Apr 18
0
Discrepancy between gam from gam package and gam in S-PLUS
Dear Trevor, I've noticed a discrepancy in the degrees of freedom reported by gam() from the gam package in R vs. gam() in S-PLUS. The nonparametric df differ by 1; otherwise (except for things that depend upon the df), the output is the same: --------- snip ------------ *** From R (gam version 0.93): > mod.gam <- gam(prestige ~ lo(income, span=.6), data=Prestige) >
2008 Nov 14
0
VGAM package released on CRAN
Dear Prof. Thomas Yee I$B!G(Bm very interested in your R program VGAM. I tried below your data: # Nonparametric proportional odds model data(pneumo)pneumo = transform(pneumo, let=log(exposure.time))vgam(cbind(normal,mild,severe) ~ s(let), cumulative(par=TRUE), pneumo) However, the results by Version of VGAM are different; ----------The result by Version 0.7-7
2012 Apr 05
4
Appropriate method for sharing data across functions
In trying to streamline various optimization functions, I would like to have a scratch pad of working data that is shared across a number of functions. These can be called from different levels within some wrapper functions for maximum likelihood and other such computations. I'm sure there are other applications that could benefit from this. Below are two approaches. One uses the <<-
2004 Oct 31
2
Obtaining fitted model information
Dear list, I am brand new to R and using Dalgaard's (2002) book Introductory Statistics with R (thus, some of my terminology may be incorrect). I am fitting regression models and I want to use Hurvich and Tsai's AICC statistic to examine my regression models. This penalty can be expressed as: 2*npar * (n/(n-npar-1)). While you can obtain AIC, BIC, and logLik, I want to impose the AICC
2010 Sep 15
1
optim with BFGS--what may lead to this, a strange thing happened
Dear R Users on a self-written function for calculating maximum likelihood probability (plz check function code at the bottom of this message), one value, wden, suddenly jump to zero. detail info as following: w[11]=2.14 lnw =2.37 2.90 3.76 ... regw =1.96 1.77 1.82 .... wden=0.182 0.178 0.179... w[11]=2.14 lnw=2.37 2.90 3.76 ... regw =1.96 1.77 1.82 .... wden=0.182
2008 Mar 27
1
A faster way to compute finite-difference gradient of a scalar function of a large number of variables
Hi All, I would like to compute the simple finite-difference approximation to the gradient of a scalar function of a large number of variables (on the order of 1000). Although a one-time computation using the following function grad() is fast and simple enough, the overhead for repeated evaluation of gradient in iterative schemes is quite significant. I was wondering whether there are
2008 Dec 03
1
nlminb: names of parameter vector not passed to objective function
Dear R developers, I tried to use nlminb instead of optim for a current problem (fitting parameters of a differential equation model). The PORT algorithm converged much better than any of optim's methods and the identified parameters are plausible. However, it took me a while before spotting the reason of a technical problem that nlminb, in contrast to optim, does not pass names of the
2008 Dec 19
0
What BIC is calculated by 'regsubsets'?
The function 'regsubsets' appears to calculate a BIC value that is different from that returned by the function 'BIC'. The latter is explained in the documentation, but I can't find an expression for the statistic returned by 'regsubsets'. Incidentally, both of these differ from the BIC that is given in Ramsey and Schafer's, The Statistical Sleuth. I assume
2007 Oct 23
0
API for optimization with Simulated annealing
Dear list, I was trying to use the R API for optimization method "Simulated annealing" void samin(int n, double *x, double *Fmin, optimfn fn, int maxit, int tmax, double temp, int trace, void *ex); but I encountered the following problem: The implementation of the function samin (as seen in src/main/optim.c) passes its void * argument "ex" into the function
2003 Nov 21
1
: BIC for gls models
Hi all, I would like to know how the BIC criterion is calculated for models estimated using gls( ) function. I read in Pinheiro & Bates (2000) p84 that BIC = -2logL + npar*log(N) (for the ML method), or BIC = -2logLR + npar*log(N-p) (for the REML method) but when I use any of these formulae I don't obtain the result given by R. Thanks in advance for any help. Eve CORDA Office national
2006 Feb 09
1
glmm.admb - bug and possible solution??
Dear Dr Skaug and R users, just discovered glmm.admb in R, and it seems a very useful tool. However, I ran into a problem when I compare two models: m1<-glmm.admb(survival~light*species*damage, random=~1, group="table", data=bm, family="binomial", link="logit") m1.1<-glmm.admb(survival~(light+species+damage)^2, random=~1, group="table", data=bm,
2002 Nov 25
3
How top print intermediate values from inside a function?
Hi: In R, how do I display some intermediate results calculated in a "for" loop within a function? For example, in the attached code, how do I get it to print the intermediate variable "mh.new" for each simulation, when I call the function "MHsim.ind"? thanks for any help, Ravi. #################################################################### MHsim.ind
2018 Apr 17
1
Minor glitch in optim()
Having worked with optim() and related programs for years, it surprised me that I haven't noticed this before, but optim() is inconsistent in how it deals with bounds constraints specified at infinity. Here's an example: # optim-glitch-Ex.R x0<-c(1,2,3,4) fnt <- function(x, fscale=10){ yy <- length(x):1 val <- sum((yy*x)^2)*fscale } grt <- function(x, fscale=10){ nn
2006 Sep 07
0
Help understanding how nls parses the formula argument to estimate the model
I could use some help understanding how nls parses the formula argument to a model.frame and estimates the model. I am trying to utilize the functionality of the nls formula argument to modify garchFit() to handle other variables in the mean equation besides just an arma(u,v) specification. My nonlinear model is y<-nls(t~a*sin(w*2*pi/365*id+p)+b*id+int,data=t1,