search for: npars

Displaying 20 results from an estimated 37 matches for "npars".

Did you mean: pars
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 <<-
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
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
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
2003 Jul 18
3
question about formulating a nls optimization
Dear list, I'm migrating a project from Matlab to R, and I'm facing a relatively complicated problem for nls. My objective function is below: >> objFun <- function(yEx,xEx,tEx,gamma,theta,kappa){ yTh <- pdfDY(xEx,tEx,gamma,theta,kappa) sum(log(yEx/yTh)^2) } The equation is yTh=P(xEx,tEx) + noise. I collect my data in: >> data <-
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
2004 Nov 17
1
Re: variations on the theme of survSplit
...)) { n.covs <- 1 covs <- as.matrix(covs) }else{ n.covs <- 0 } } ordered.t <- t(apply(cbind(onset,time.dep),1,sort,na.last=TRUE)) tot.time.dep <- apply(ordered.t,1,function(x) sum(!is.na(x))) ordered.t <- cbind(rep(0, nrow(ordered.t)), ordered.t) npars <- 4+n.time.dep+n.covs nrecs <- sum(tot.time.dep) new.x <- as.data.frame(matrix(nr=nrecs, nc=npars)) names(new.x) <- c("start", "stop", "event", names(time.dep),names(covs),"episode") this.rec<-0 for(i in 1:length(onset)) { for(j...
2008 Aug 20
3
bug in lme4?
Dear all, I found a problem with 'lme4'. Basically, once you load the package 'aod' (Analysis of Overdispersed Data), the functions 'lmer' and 'glmer' don't work anymore: library(lme4) (fm1 <- lmer(Reaction ~ Days + (Days|Subject), sleepstudy)) (gm1 <- glmer(cbind(incidence, size - incidence) ~ period + (1 | herd), family = binomial, data
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
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
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
2003 May 20
3
a quick Q about memory limit in R
Hello, there, I got this error when i tried to run " data.kr <- surf.gls(2, expcov, data, d=0.7);" "Error: cannot allocate vector of size 382890 Kb Execution halted" My data is 100x100 grid. the following is the summary of "data": > summary(data); x y z Min. : 1.00 Min. : 1.00 Min. :-1.0172 1st Qu.: 26.00
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
2007 Sep 07
1
negative value for AIC and BIC
Hi all, I obtained negative values for AIC and BIC criteria for a particular model that I have developped... I don't remember to have negative values for these crietria for others applications, so I am a little suprised... Could anyone tell me if something is wrong or his conclusion concerning my model? Best regards, Olivier.
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
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