Displaying 20 results from an estimated 60 matches similar to: "Discrepancy between gam from gam package and gam in S-PLUS"
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
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
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
2010 Feb 01
0
Building a plotmath string in a function
I apologize if this has been asked before but I've look for a long time with
no success. My problem is that I want to annotate a plot with an expression
that combines parameter names with fitted values for from 1 to n parameters
depending on the problem - something like
R = 16.1, P[m] = 4.51, k[a] = 7.23, alpha[r] = .01 ...
with the [] values as subscripts. I thought that because the number
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
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
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,
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
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 <<-
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
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
2008 Feb 08
0
Cumulative multinomial regression using VGAM
Hi,
I am trying to carry out a multinomial regression using the cumlogit link function. I have tried using the VGAM package, and have gotten some results...
fit1 <- vgam(Y ~ X1 + X2 + X3 + X4,
cumulative(link=logit,intercept.apply=FALSE,parallel=TRUE),
data = data1
)
The problem arrises when I try to get the information out of the fitted object. I can
2004 Jul 16
0
Does AIC() applied to a nls() object use the correctnumber of estimated parameters?
Thanks Adaikalavan, however the problem remains.
Considering AIC() as applied to the linear model in AIC() help
documentation:
> data(swiss)
> lm1 <- lm(Fertility ~ . , data = swiss)
> AIC(lm1)
[1] 326.0716
Clearly this includes the estimation of the residual standard error as
an estimated parameter, as this gives the correct score:
> -2*logLik(lm1) + 2*(length(coef(lm1))+1)
2011 Apr 15
1
Sweave and Slides (Beamer)
I'm posting this for two reasons: one is to see if anyone has a better
way of solving the problem or suggestions for improving my existing
approach; and the other is to show what I'm currently doing in case
anyone else might find it useful.
The background is that I've been using Sweave for several years now to
produce class notes, and I sometimes include quite a lot of raw R input
and
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
2012 Mar 18
1
Converting expression to a function
Previously, I've posted queries about this, and thanks to postings and messages in
response have recently had some success, to the extent that there is now a package called
nlmrt on the R-forge project https://r-forge.r-project.org/R/?group_id=395 for solving
nonlinear least squares problems that include small or zero residual problems via a
Marquardt method using a call that mirrors the nls()
2010 Sep 07
5
question on "optim"
Hey, R users
I do not know how to describe my question. I am a new user for R and write the
following?code for a dynamic labor economics?model and use OPTIM to get
optimizations and parameter values. the following code does not work due to
the?equation:
?? wden[,i]<-dnorm((1-regw[,i])/w[5])/w[5]
where w[5]?is one of the parameters (together with vector a, b and other
elements in vector