similar to: nls problem: singular gradient

Displaying 20 results from an estimated 600 matches similar to: "nls problem: singular gradient"

2012 Aug 01
1
optim() for ordered logit model with parallel regression assumption
Dear R listers, I am learning the MLE utility optim() in R to program ordered logit models just as an exercise. See below I have three independent variables, x1, x2, and x3. Y is coded as ordinal from 1 to 4. Y is not yet a factor variable here. The ordered logit model satisfies the parallel regression assumption. The following codes can run through, but results were totally different from what I
2008 Mar 25
3
derivatives in R
Hi, I posted this message earlier in "Rmetrics" and I don't know whether I posted in the wrong place, so I'm posting it again in Rhelp. I have a function in x and y and let's call it f(x,y). I need to get the Hessian matrix. i.e I need (d^2f/dx^2), (d^2f/dxdy), (d^2f/dydx), (d^2f/dy^2).I can get these using the D function. now I need to evaluste the hessian matrix for
2010 Nov 30
1
confidence interval for logistic joinpoint regression from package ljr
I?m trying to run a logistic joinpoint regression utilising the ljr package. I?ve been using the forward selection technique to get the number of knots for the analysis, but I?m uncertain as to my results and the interpretation. The documentation is rather brief ( in the package and the stats in medicine article is quite technical) and without any good examples. At the moment I?m thinking 1)find
2008 Apr 04
1
Problems with Unit Root testing using ur.df function
Hi All, I'm new to R and am trying to run a unit root test on the vector "y" (a time series of inflation (i.e. changes in the Consumer Price Index quarter on quarter)). I've run the Augmented-Dickey-Fuller Test below (R's URCA package). It gives me an error that it cannot find the function ur.df unless I comment out the third last line of code (see below). I try to call
1998 Apr 27
1
R-beta: vectors in dataframe?
I have a file: x y z 0.025 0.025 1.65775 0.025 0.050 1.62602 0.025 0.075 1.63683 0.025 0.100 1.91847 0.025 0.125 2.00913 0.025 0.150 1.82222 0.025 0.175 1.70901 0.025 0.200 1.39759 0.025 0.225 1.39089 0.025 0.250 1.04762 If I read the file like this: data<-read.table("file.dat") How do I access the vectors x,y,z that are inside the dataframe data? I studied Venables and
2013 Apr 09
0
[R-SIG-Finance] EM algorithm with R manually implemented?
Moved to R-help because there's no obvious financial content. Michael On Sat, Apr 6, 2013 at 10:56 AM, Stat Tistician <statisticiangermany at gmail.com> wrote: > Hi, > I want to implement the EM algorithm manually, with my own loops and so. > Afterwards, I want to compare it to the normalmixEM output of mixtools > package. > > Since the notation is very advanced, I
2011 Feb 26
0
A problem about realized garch model
Hi, I am trying to write the Realized GARCH model with order (1,1) The model can be describe bellow: r_t = sqrt( h_t) * z_t logh_t = w + b*logh_(t-1) + r*logx_(t-1) logx_t = c + q*logh_t + t1*z_t +t2*(z_t ^2 -1) + u_t and z follow N(0,1) , u follow N(0, sigma.u^2) But I'm troubled with the simulation check for my code. After I simulate data from the model and estimate the data, I
2009 Dec 04
1
z to r transformation within print.rma.uni and forest from the package metafor
Dear R community, I'm using the ,metafor'-package by Wolfgang Viechtbauer (Version: 0.5-5) to calculate random-effects meta-analyses using Correlations and Sample Sizes as the raw data. (By the way: Really a nice piece of work, Wolfgang! Thanks heaps.) I specified the "rma.uni' function so that it looks like this: MAergebnis<-rma.uni(ri=PosOutc, ni=N,
2012 Jul 12
0
Generate random numbers with nested Archimedean Copula
Hi everybody, I try to simulate random numbers from a trivariate nested Archimedean copula. My aim is to correlate two processes with, e.g. theta2, as the so called child pair and then to correlate these two processes with a third one with theta1 (parent). This "figure" tries to capture what I am explaining theta1 theta2
2017 Jun 04
0
Hlep in analysis in RWinBugs
Hi R User, I was trying to use R for WINBUGS using following model and data (example), but I am new with WINBUGS and don't know how we perform the analysis. I wonder whether I can run the following the example data and Winbugs Model in R. Your help will be highly appreciated. Sincerely, SN PANDIT === library(R2WinBUGS) #Model model{ #likelihood for(i in 1:N){ a1[i] ~ dnorm(a11[i],tau)
2017 Jun 04
0
Help in analysis in RWinBugs
Hi R User, I was trying to use R for WINBUGS using following model and data (example), but I am new with WINBUGS and don't know how we perform the analysis. I wonder whether I can run the following the example data and Winbugs Model in R. Your help will be highly appreciated. Sincerely, SN PANDIT === library(R2WinBUGS) #Model model{ #likelihood for(i in 1:N){ a1[i] ~ dnorm(a11[i],tau)
2012 Feb 03
1
A question on Unit Root Test using "urca" toolbox
Hello, I have a question on unit root test with urca toolbox. First, to run a unit root test with lags selected by BIC, I type: > CPILD4UR<-ur.df(x1$CPILD4[5:nr1], type ="drift", lags=12, selectlags ="BIC") > summary(CPILD4UR) The results indicate that the optimal lags selected by BIC is 4. Then I run the same unit root test with drift and 4 lags:
2009 Nov 02
1
need help in using Hessian matrix
Hi I need to find the Hessian matrix for a complicated function from a certain kind of data but i keep getting this error Error in f1 - f2 : non-numeric argument to binary operator the data is given by U<-runif(n) Us<-sort(U) tau1<- 2 F1tau<- pgamma((tau1/theta1),shape,1) N1<-sum(Us<F1tau) X1<- Us[1:N1]
2012 May 05
3
metafor
Dear users of metafor, I am working on a meta-analysis using the metafor package. I have a excel csv database that I am working with. I am interested in pooling the effect measures for a particular subgroup (European women) in this csv database. I am conducting both sub-group and meta-regression. In subgroup-analyses, I have stratified the database to create a separate csv file just for European
2011 Aug 02
1
How to 'mute' a function (like confint())
Dear R-helpers, I am using confint() within a function, and I want to turn off the message it prints: x <- rnorm(100) y <- x^1.1+rnorm(100) nlsfit <- nls(y ~ g0*x^g1, start=list(g0=1,g1=1)) > confint(nlsfit) Waiting for profiling to be done... 2.5% 97.5% g0 0.4484198 1.143761 g1 1.0380479 2.370057 I cannot find any way to turn off 'Waiting for. .." I tried
2012 Jan 18
4
R package dev: how to export constant?
Hi, i create two constants kilo and milli in [1]. These should be available after loading library(sitools) How should i export them and what have i done wrong? (Other suggestions for improving the package are welcome too) The ready to use .tar.gz and the source can be found on github [2,3] kind regatds, [1] https://github.com/jonasstein/sitools/blob/master/init.R [2]
2012 Jan 16
2
howto test a package without installation
Hi, how can i play around with my first selfwritten package [*] without to install it to my debian system? I think of something like doing this: /tmp/$ R R version 2.11.1 (2010-05-31) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 > library(/tmp/sitools) 3 * kilo [1] 3000 [*] https://github.com/jonasstein/sitools -- Jonas Stein <news at
2017 Mar 17
4
Hyperbolic tangent different results on Windows and Mac
Dear all, We seem to have found a "strange" behaviour in the hyperbolic tangent function tanh on Windows. When running tanh(356 + 0i) the Windows result is NaN + 0.i while on Mac the result is 1 + 0i. It doesn't seem to be a floating point error because on Mac it is possible to run arbitrarily large numbers (say tanh(
2007 Mar 12
4
meta-regression, MiMa function, and R-squared
Dear Wolfgang Viechtbauer and list members: I have discovered your "MiMa" function for fitting meta-analytic mixed-effects models through an earlier discussion on this list. I think it is extremely useful and fills an important gap. In particular, since it is programmed so transparently, it is easy to adapt it for one's own needs. (For example, I have found it easy to identify
2017 May 04
2
complex tests failure
For a while I have been getting that the complex tests fails on RHEL 6. The specific issue has to do with tanh (see below for full output from complex.Rout.fail). This is both with the stock compiler (GCC 4.4.7) and a compiler supplied through the conda project (GCC 4.8.5). The compiler supplied through conda ends up linking R to certain system files, so the binary is not completely independent