Displaying 20 results from an estimated 3000 matches similar to: "Parameter estimation in nls"
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 Jul 11
2
nls problem: singular gradient
Why fails nls with "singular gradient" here?
I post a minimal example on the bottom and would be very
happy if someone could help me.
Kind regards,
###########
# define some constants
smallc <- 0.0001
t <- seq(0,1,0.001)
t0 <- 0.5
tau1 <- 0.02
# generate yy(t)
yy <- 1/2 * ( 1- tanh((t - t0)/smallc) * exp(-t / tau1) ) + rnorm(length(t))*0.01
# show the curve
2000 Nov 28
4
random number generator
I have an inquire about the RNG in R
It is known that when we use the " rnorm " function , we pass the
arguments :
1- number of variables to be generated
2- mean vector of the normal random errors.
3- standard deviation vector of the normal random errors.
my question is the following
Is the a way (a function) in R that we could specify the covariance
matrix in step 3, instead of the
2011 May 01
1
Urgent: conditional formula for nls
I have data vectors x and y both with 179 observations. I'm trying to
fit a nonlinear model with five parameters using nls. The formula is
only defined within a range of x-values, it should be zero otherwise,
thus my attempted use of ifelse:
> df<-data.frame(x,y)
>
2009 Nov 13
2
AR(2) modelling
Hi useRs,
I'm trying to fit a basic AR(2) model with the 'ar' function. And when
I try to check the value of the coefficients, I could not find the
same value as the 'ar' function.
Here is my example:
myserie <- c(212, 205, 210, 213, 217, 222, 216, 218, 220, 212, 215, 236)
#plot(myserie, type="l")
myserieminus0 <- tail(myserie, -2)
myserieminus1 <-
2009 Nov 13
2
AR(2) modelling
Hi useRs,
I'm trying to fit a basic AR(2) model with the 'ar' function. And when
I try to check the value of the coefficients, I could not find the
same value as the 'ar' function.
Here is my example:
myserie <- c(212, 205, 210, 213, 217, 222, 216, 218, 220, 212, 215, 236)
#plot(myserie, type="l")
myserieminus0 <- tail(myserie, -2)
myserieminus1 <-
2011 Oct 11
1
singular gradient error in nls
I am trying to fit a nonlinear regression to infiltration data in order to
determine saturated hydraulic conductivity and matric pressure. The
original equation can be found in Bagarello et al. 2004 SSSAJ (green-ampt
equation for falling head including gravity). I am also VERY new to R and
to nonlinear regressions. I have searched the posts, but am still unable to
determine why my data come up
2000 Jun 20
1
pacf
Dear list,
according to the documentation of acf{ts}
"the partial correlation coefficient is estimated by fitting
autoregressive models of successively higher orders up to lag.max. "
However, R seems to return the Yule-Walker estimates of the PACF by
default. You can check this using c(1:10) as the series: the YW
estimates are 0.7000000 and -0.1527035 for lags 1 and 2 . If the PACF
2002 Dec 11
3
Modified Bessel Function - 2nd kind
In order to fit a probability distribution proposed by Sichel [Journal of
the Royal Statistical Society. Series A (General), Vol. 137,
No. 1. (1974), pp. 25-34], I need a modified Bessel function of the 2nd
kind. I notice that the base package of "R" only has modified Bessel
functions of the 1st and 3rd kind. Does a modified Bessel function of the
2nd kind exist anywhere?
Many
2010 Apr 08
1
incomplete final line found by readTableHeader
Hi
I am trying this
> x <- read.table("/home/kenji/1245/GDS1_2grps_.cls", header = F, skip = 2)
> x <- read.table("/home/kenji/1246/MYCset.cls", header = F, skip = 2)
Warning message:
In read.table("/home/kenji/1246/MYCset.cls", header = F, skip = 2) :
incomplete final line found by readTableHeader on
'/home/kenji/1246/MYCset.cls'
Here are the
2008 Jul 14
2
how to correlate nominal variables?
Dear R-Users,
I need functions to calculate Yule's Y or Cram?rs Index, in order to
correlate variables that are nominally scaled?
Am I wrong? Are such functions existing?
Sincerely,
Timo
2008 Jun 27
1
Yule Kendall resistant measure of skewness
Dear R Users,
Is anyone aware of a package which calculates the Yule Kendall resistant
(to errors,outliers) measure of skewness ? An easy calculation to perform,
but was just wondering if a package exists (as the contents of that
package would probably include other cool things I would also be
interested).
Thanks,
Tolga
Generally, this communication is for informational purposes only
and it
2011 Jul 07
3
AR vs ARIMA question
Dear R People:
Here is some output from AR and ARIMA functions:
> xb <- arima.sim(n=120,model=list(ar=0.85))
> xb.ar <- ar(xb)
> xb.ar
Call:
ar(x = xb)
Coefficients:
1
0.6642
Order selected 1 sigma^2 estimated as 1.094
> xb.arima <- arima(xb,order=c(1,0,0),include.mean=FALSE)
> xb.arima
Call:
arima(x = xb, order = c(1, 0, 0), include.mean = FALSE)
2012 Feb 10
3
Help needed please
I have coded a time series from simulated data:
simtimeseries <- arima.sim(n=1024,list(order=c(4,0,0),ar=c(2.7607, -3.8106, 2.6535, -0.9258),sd=sqrt(1)))
#show roots are outside unit circle
plot.ts(simtimeseries, xlab="", ylab="", main="Time Series of Simulated Data")
# Yule ----------------------------------------------------------------------------
q1 <-
2012 Jun 28
1
add constraints to nls or use another function
Hello,
I'm trying to fit experimental data with a model and nls.
For some experiments, I have data with x from 0 to 1.2 and the fit is quite
good.
But it can happen that I have data only the [0,0.8] range (see the example
below) and, then, the fit is not correct.
I would like to add a constraint, for example : the second derivative must
be positive.
But I don't know how to add this to
2018 Sep 09
2
Confusion about linear prediction within flac
Hi,
I'm researching lossless compression for a highschool mathematics
research essay and am fairly confused about how the linear prediction
coefficients are solved for within flac.
As far as I understand, Levinson Durbin Recursion is used to solve for
these coefficients, however, what I don't understand is what the
toeplitz matrix is composed of. I found sources using samples from
within
1997 Oct 29
4
R-beta: new executable
I have just put up a new executable as a replacement for the one in
rseptbeta.zip
there have only been a few changes; mostly to the menu's. I am about
to start on a major overhaul including getting survival to work and
grabbing the 0.60 version once it's stable.
Please let me know about other enhancements you want....
robert
1997 Oct 29
4
R-beta: new executable
I have just put up a new executable as a replacement for the one in
rseptbeta.zip
there have only been a few changes; mostly to the menu's. I am about
to start on a major overhaul including getting survival to work and
grabbing the 0.60 version once it's stable.
Please let me know about other enhancements you want....
robert
2010 Dec 08
1
Newbie - want to view code for a function
Brand new to R
Want to understand the algorithm used in yule-walker time series
autoregression model
I assume there is a way to see the source for ar.yw
I also assume that everybody except me knows how
Could someone suggest to me how to find out
I've looked thru some of the documenttion - there's a lot - and
apparently I haven't looked the right place.
Thanks in advance
Dick
2011 Mar 29
1
Simple AR(2)
Hi there, we are beginners in R and we are trying to fit the following time
series using ar(2):
> x <- c(1.89, 2.46, 3.23, 3.95, 4.56, 5.07, 5.62, 6.16, 6.26, 6.56, 6.98,
> 7.36, 7.53, 7.84, 8.09)
The reason of choosing the present time series is that the we have
previously calculated analitically the autoregressive coefficients using
the direct inversion method as 1.1, 0.765, 0.1173.