similar to: fitting cosine curve

Displaying 20 results from an estimated 1000 matches similar to: "fitting cosine curve"

2017 Jun 20
0
fitting cosine curve
Hi lily, You can get fairly good starting values just by eyeballing the curves: plot(y) lines(supsmu(1:20,y)) lines(0.6*cos((1:20)/3+0.6*pi)+17.2) Jim On Wed, Jun 21, 2017 at 9:17 AM, lily li <chocold12 at gmail.com> wrote: > Hi R users, > > I have a question about fitting a cosine curve. I don't know how to set the > approximate starting values. Besides, does the method
2017 Jun 21
1
fitting cosine curve
Using a more stable nonlinear modeling tool will also help, but key is to get the periodicity right. y=c(16.82, 16.72, 16.63, 16.47, 16.84, 16.25, 16.15, 16.83, 17.41, 17.67, 17.62, 17.81, 17.91, 17.85, 17.70, 17.67, 17.45, 17.58, 16.99, 17.10) t=c(7, 37, 58, 79, 96, 110, 114, 127, 146, 156, 161, 169, 176, 182, 190, 197, 209, 218, 232, 240) lidata <- data.frame(y=y, t=t) #I use the
2017 Jun 21
1
fitting cosine curve
If you know the period and want to fit phase and amplitude, this is equivalent to fitting a * sin + b * cos > >>> > I don't know how to set the approximate starting values. I'm not sure what you meant by that, but I suspect it's related to phase and amplitude. > >>> > Besides, does the method work for sine curve as well? sin is the same as cos with
2017 Jun 21
0
fitting cosine curve
I'm trying the different parameters, but don't know what the error is: Error in nlsModel(formula, mf, start, wts) : singular gradient matrix at initial parameter estimates Thanks for any suggestions. On Tue, Jun 20, 2017 at 7:37 PM, Don Cohen <don-r-help at isis.cs3-inc.com> wrote: > > If you know the period and want to fit phase and amplitude, this is > equivalent to
2017 Jun 21
2
fitting cosine curve
What I did was to plot your initial values, then plot the smoothed values and guess the constants. That is, I got an "eyeball" fit to the smoothed values. As I have described this as "gross cheating" in the past, you should either split your data, estimate on one subset and then test on another, or estimate on your data and test on a replication. If you get pretty much the same
2012 Feb 06
1
Simple lm/regression question
I am trying to use lm for a simple linear fit with weights. The results I get from IDL (which I am more familiar with) seem correct and intuitive, but the "lm" function in R gives outputs that seem strange to me. Unweighted case: > x<-1:4 > y<-(1:4)^2 > summary(lm(y~x)) Call: lm(formula = y ~ x) Residuals: 1 2 3 4 1 -1 -1 1 Coefficients:
2011 May 01
1
Different results of coefficients by packages penalized and glmnet
Dear R users: Recently, I learn to use penalized logistic regression. Two packages (penalized and glmnet) have the function of lasso. So I write these code. However, I got different results of coef. Can someone kindly explain. # lasso using penalized library(penalized) pena.fit2<-penalized(HRLNM,penalized=~CN+NoSus,lambda1=1,model="logistic",standardize=TRUE) pena.fit2
2012 Oct 05
2
Dúvida função Anova pacote car - Medidas repetidas
Olá pessoal, estou realizando uma ANOVA com medidas repetidas e estou utilizando a função "Anova" do pacote "car". Medi o biovolume de algas a cada dois dias durante 10 dias (no banco de dados abaixo só coloquei até o 4° dia). Tenho 2 tratamentos ("c","t") e o experimento foi realizado em tréplicas ("A","B","C"). > Pa2
1999 Dec 01
1
density(kernel = "cosine") .. the `wrong cosine' ..
I'm in teaching mode, kernel densities. {History: density() was newly introduced in version 0.15, 19 Dec 1996; most probably by Ross or Robert } When I was telling the students about different kernels (and why their choice is not so important, and "equivalent bandwidths" etc,etc) I wondered about the "Cosine" in my teaching notes which is defined there as k(x)
2002 Jan 09
1
Distance matrix by cosine?
Hello, a. is there a possibility to obtain a distance matrix with the cosine between vectors?? hclust, hierclust, dist will not work and seem to be hard to extend. b. if there is not: Is the cosine between vectors implemented somewhere? Thanks for all hints and advice! Petra Steiner -------------- next part -------------- An HTML attachment was scrubbed... URL:
2012 Nov 26
1
cosine curve fit
does anybody have a suggestion as to how to use R to fit some date to a cosine function and then have some output statistics that will evaluate the fit? -- View this message in context: http://r.789695.n4.nabble.com/cosine-curve-fit-tp4650866.html Sent from the R help mailing list archive at Nabble.com.
2002 Jan 25
1
Fw: Summary for Distance matrix by cosine?
Dear all, below you find enclosed my message from January 9th and my program (attention: beginner). Thanks for both answers! a. However, as far as I know the cosine is not the same as the Pearson correlation (only in special cases). b. Reid Huntsinger's hint was very useful, however I had to transpose the matrix first, for I want to calculate the distance of the _rows_. Regards, Petra
2012 Feb 23
1
Problems with Cosine Similarity using library(lsa)
Hi everybody! I have intended to use library(lsa) on R 64-bits for Windows but it was not possible. Every time I try to launch library(lsa) function R give me back next message: Loading required package: SnowballError : .onLoad failed in loadNamespace() for 'Snowball', details: call: NULL error: .onLoad failed in loadNamespace() for 'rJava', details: call: stop("No
2001 Jun 10
0
Modified discrete cosine transform
I am trying to learn something of the algorithms used in Vorbis. One of them is the "Modified Discrete Cosine Transform" (MDCT). I have found a couple of books with brief descriptions of the DCT, but almost nothing about MDCT. (1) is there just one Modified DCT, which can be expected to be the same whenever someone uses that name, or does it just mean that you have changed
2000 Mar 09
0
cosine and sine
Excuse me if this is has been discussed before, but, How can I make the cos(pi/2) = 0 (instead of on my machine 6.123234e-17) and the sin(pi) = 0 (instead of 1.224647e-16 on my machine) ? I'd like sin(pi) == 0 to return TRUE, and is zapsmall appropriate here? -------------- next part -------------- A non-text attachment was scrubbed... Name: brian.vcf Type: text/x-vcard Size: 411 bytes Desc:
2017 Jun 21
0
fitting cosine curve
Thanks. I will do a trial first. Also, is it okay to have the datasets that have only part of the cycle, or better to have equal or more than one cycle? That is to say, I cannot have the complete datasets sometimes. On Tue, Jun 20, 2017 at 7:37 PM, Don Cohen <don-r-help at isis.cs3-inc.com> wrote: > > If you know the period and want to fit phase and amplitude, this is > equivalent
2024 Mar 26
1
core & cosine schema items in Samba AD DC user object?
Please, it is possible (perhaps with some Samba schema extension?) to have items as 'c' (countryName), 'l' (localityName), 'l' (localityName), 'co' (friendlyCountryName), 'street' (streetAddress), 'displayName' etc. in the description of the USER object? And then how to manage them? The "samba-tool user add" doesn't seem to have a
2024 Mar 26
1
core & cosine schema items in Samba AD DC user object?
On Tue, 26 Mar 2024 17:13:34 +0100 Franta Hanzl?k <franta at hanzlici.cz> wrote: > > Yes, that's how I understood it later. > But what surprised me is that an object ("user" class in this case) > can be assigned any imaginary attribute - I thought that the Samba > AD schema strictly limits what objects and with what attributes can > be in the AD. But maybe
2012 Sep 06
0
lme( y ~ ns(x, df=splineDF)) error
I would like to fit regression models of the form y ~ ns(x, df=splineDF) where splineDF is passed as an argument to a wrapper function. This works fine if the regression function is lm(). But with lme(), I get two different errors, depending on how I handle splineDF inside the wrapper function. A workaround is to turn the lme() command, along with the appropriate value of splineDF, into a text
2012 Sep 26
0
lme(y ~ ns(x, df=splineDF)) error
I would like to fit regression models of the form y ~ ns(x, df=splineDF) where splineDF is passed as an argument to a wrapper function. This works fine if the regression function is lm(). But with lme(), I get two different errors, depending on how I handle splineDF inside the wrapper function. A workaround is to turn the lme() command, along with the appropriate value of splineDF, into a text