similar to: try (nls stops unexpectedly because of chol2inv error

Displaying 20 results from an estimated 120 matches similar to: "try (nls stops unexpectedly because of chol2inv error"

2009 Aug 21
2
Problem with passing a string to subset
Dear R-users, The following question bothered me for the whole afternoon: how can one pass a string as the conditioning argument to subset? I tried plain mystr, eval(mystr), expression(mystr), etc... I don't to be able to find the correct syntax > foo <- data.frame(a=1:10,b=10:1,c=rep(1:2,5)) > mystr<-"c==1" > subset(foo,c==1) a b c 1 1 10 1 3 3 8 1 5 5 6
2008 Aug 31
1
Parenthesis recognition with grep
Dear R-users, I need to dynamically recognize the index of a given string myStr in a vector of string. The problem is that myStr might contain parenthesis, causing grep not to recognize it the way I want (see below). The help mentions that the pattern used by grep should be in the POSIX format... I guess the problem is here; unfortunately, I am not familiar with the subtleties of the POSIX
2009 Sep 15
1
Regular expression problem
Dear R-users, I am trying to use the grep function to test whether a particular string is of the form "n.../mydir/myfile.mytype.myext". Anything between n and mytype could vary, and anything after mytype could vary. I tried to proceed by steps to build my regular expression... but I do not really understand why the last call of the following code do not work. Any help would be
2007 May 11
1
Cannot use an escape character in regexp
Given the string > mystr <- "(Preconsuntivo del giorno gas 10 maggio 2007)Tj" I'm trying to detect and eliminate the string ")Tj" at the very end of mystr by means of gsub(rx2,"",mystr) BUT preparing the matching regexp string a warning pops up > rx2 <- "\)Tj$" Warning messages: 1: '\)' is an unrecognized escape in a
2007 Apr 12
1
LME: internal workings of QR factorization
Hi: I've been reading "Computational Methods for Multilevel Modeling" by Pinheiro and Bates, the idea of embedding the technique in my own c-level code. The basic idea is to rewrite the joint density in a form to mimic a single least squares problem conditional upon the variance parameters. The paper is fairly clear except that some important level of detail is missing. For
2009 Apr 21
2
Changing the binning of collected data
Dear All, Apologies if this is too simple for this list. Let us assume that you have an instrument measuring particle distributions. The output is a set of counts {n_i} corresponding to a set of average sizes {d_i}. The set of {d_i} ranges from d_i_min to d_i_max either linearly of logarithmically. There is no access to further detailed information about the distribution of the measured sizes, but
2004 Apr 18
2
lm with data=(means,sds,ns)
Hi Folks, I am dealing with data which have been presented as at each x_i, mean m_i of the y-values at x_i, sd s_i of the y-values at x_i number n_i of the y-values at x_i and I want to linearly regress y on x. There does not seem to be an option to 'lm' which can deal with such data directly, though the regression problem could be algebraically
2007 Apr 12
0
LME: internal workings of QR factorization --repost
Hi: I've been reading "Computational Methods for Multilevel Modeling" by Pinheiro and Bates, the idea of embedding the technique in my own c-level code. The basic idea is to rewrite the joint density in a form to mimic a single least squares problem conditional upon the variance parameters. The paper is fairly clear except that some important level of detail is missing. For
2008 Jun 02
1
Italics in plot main title
Hi, I am drawing several plots and want to have italics in a main title; this is easy with expression(). However, I want also to add a value to it, say n_i, that depends on an ith plot. For this I am using paste(). An example: n_i = 10, 20, 30; I want to draw a plot for each i with the title: "Relative efficiency for sample size n = n_i", where n should be in italics, and of course n_i
2013 Mar 22
1
Integration of vector syntax unknown
Hello, I'm very new to using R, but I was told it could do what I want. I'm not sure how best to enter the information but here goes... I'm trying to transfer the following integral into R to solve for ln(gamma_1), on the left, for multiple instances of gamma_i and variable N_i. gamma_i is, for example, (0, 0.03012048, 0.05000000, 0.19200000, 0.44000000, 0.62566845) N_i (N_1 or
2010 Sep 05
0
cov.unscaled in NLS - how to define cov.scaled to make comparable to SAS proc NLIN output - and theoretically WHY are they different
I am running a 3-parameter nonlinear fit using the default Gauss-Newton method of nls. initialValues.L = list(b=4,d=0.04,t=180); fit.nls.L = nls( myModel.nlm , fData.L, start = initialValues.L, control = nls.control(warnOnly = TRUE), trace=T ); summary.nls.L = summary(fit.nls.L); I run the same analysis in SAS proc NLIN. proc nlin data=apples outest=a; parms b=4 d=.04 t=180; model Y =
2010 Dec 15
4
Generacion de binomiales correlacionadas
Buenas tardes, Estoy interesado en generar observaciones de una distribucion binomial bivariada en la que hay _cierto_ grado de correlacion (denotemoslo rho). Podria por favor alguien indicarme como hacerlo en R? Este es el contexto. Supongamos que se tienen dos experimentos en los que la variable respuesta _sigue_ una distribucion binomial, i.e., X_i ~Binomial(n_i, p_i), i=1,2 y que, por ahora,
2015 Aug 14
2
[LLVM RFC] Add llvm.typeid.for intrinsic
This is for BPF output. BPF program output bytes to perf through a tracepoint. For decoding such data, we need a way to describe the format of the buffer. This patch is a try which gives each variable a unique number by introducing a new intrinsic 'llvm.typeid.for'. At the bottom is an example of using that intrinsic and the result of $ clang -target bpf -O2 -c -S ./test_typeid.c
2002 Dec 10
3
clogit and general conditional logistic regression
Can someone clarify what I cannot make out from the documentation? The function 'clogit' in the 'survival' package is described as performing a "conditional logistic regression". Its return value is stated to be "an object of class clogit which is a wrapper for a coxph object." This suggests that its usefulness is confined to the sort of data which arise in
2007 Mar 05
3
Mixed effects multinomial regression and meta-analysis
R Experts: I am conducting a meta-analysis where the effect measures to be pooled are simple proportions. For example, consider this data from Fleiss/Levin/Paik's Statistical methods for rates and proportions (2003, p189) on smokers: Study N Event P(Event) 1 86 83 0.965 2 93 90 0.968 3 136 129 0.949 4 82 70 0.854 Total
2005 Jun 15
2
need help on computing double summation
Dear helpers in this forum, This is a clarified version of my previous questions in this forum. I really need your generous help on this issue. > Suppose I have the following data set: > > id x y > 023 1 2 > 023 2 5 > 023 4 6 > 023 5 7 > 412 2 5 > 412 3 4 > 412 4 6 > 412 7 9 > 220 5 7 > 220 4 8 > 220 9 8 > ...... > Now I want to compute the
2006 Dec 08
1
MAXIMIZATION WITH CONSTRAINTS
Dear R users, I?m a graduate students and in my master thesis I must obtain the values of the parameters x_i which maximize this Multinomial log?likelihood function log(n!)-sum_{i=1]^4 log(n_i!)+sum_ {i=1}^4 n_i log(x_i) under the following constraints: a) sum_i x_i=1, x_i>=0, b) x_1<=x_2+x_3+x_4 c)x_2<=x_3+x_4 I have been using the ?ConstrOptim? R-function with the instructions
2006 Nov 21
3
Fitting mixed-effects models with lme with fixed error term variances
Dear R users, I am writing to you because I have a few question on how to fix the error term variances in lme in the hope that you could help me. To my knowledge, the closest possibility is to fix the var-cov structure, but not the whole var-cov matrix. I found an old thread (a few years ago) about this, and it seems that the only alternative is to write the likelihood down and use optim or a
2011 Aug 31
2
Getting the values out of histogram (lattice)
Hi, ? I have a relatively big dataset and I want to construct some histograms using the histogram function in lattice. One thing I am interested in is to look at differences between density and percent. I know I can use the hist function but it seems that this function gives sometimes some wrong answers and the density is actually a percent since it is calculated as counts in the bin divided by
2012 Jan 18
1
Non-linear Least Square Optimization -- Function of two variables.
Dear All, In the past I have often used minpack (http://bit.ly/zXVls3) relying on the Levenberg-Marquardt algorithm to perform non-linear fittings. However, I have always dealt with a function of a single variable. Is there any difference if the function depends on two variables? To fix the ideas, please consider the function f(R,N)=(a/(log(2*N))+b)*R+c*N^d, where a,b,c,d are fit parameters. For