similar to: Sine Regression in R

Displaying 20 results from an estimated 6000 matches similar to: "Sine Regression in R"

2008 Nov 20
4
Fitting a sine wave using solver
Greetings, I have several sets of oscillation data and would like to estimate the parameters of a sine function to each set (and hopefully automate this). A colleague provided an excel sheet that uses solver to minimize the RSS after fitting the sine function to each data set, but this cumbersome and difficult to automate. Is there a method in R for fitting a given sine function to a
2008 May 23
2
Fit a sine to data
Dear R-users, I'd like to fit a sine function to my data. The result should have a format (and thus the formula, too) y ~ a + sin(x+b) where y and x are vectors, and a and b are (yet) unknown values. The data sets (vectors x and y) are OK, and I can do a simple lm fitting lm(y~x), or lm(y~I(sin(2*pi*x/360))), succesfully My issue is that I'm not able to do the optional linear shift in
2011 Jul 27
2
fitting sine wave
Dear R-helpers ? I have 7 data points that I want to fit a continuous curve to, that should look similar to a sine wave My data points would mark the local minima and maxima respectively. This is what I?ve got so far. And I would keep doing so, but sadly nls() then says that it has reached the maximum number of Iterations? ?
2008 Jan 10
3
Cycle Regression Analysis in R?
Hello R community, Does anyone know of a package that will perform cycle regression analysis? I have searched the R-help archives etc. but have come up with nothing so far. If I am unable to find an existing R package to do so, is there anyone familiar with fitting sine functions to data. My problem is this: I have a long time-series of daily SWE estimates (SWE = snow water equivalence, or
2010 Oct 18
2
Sine function fitting
Hi, Is there a package to perform a sine function fitting to XY data? Thx, Ashz -- View this message in context: http://r.789695.n4.nabble.com/Sine-function-fitting-tp3000156p3000156.html Sent from the R help mailing list archive at Nabble.com.
2006 Feb 20
2
Write pure sine to *.ogg directly?
Hello, I am author of a Morse code training software written in Perl at http://starling.ws/morse Currently I output to *.wav and, if on Unix, convert to *.ogg. And that's okay for a trainer. But I have desire to upgrade the project to a real-time communication tool...or at least a Morse code audio mail routine. And I should like to avoid *.wav. I'd like some means of writing a pure
2008 Jun 10
3
fitting periodic 'sine wave' model
I have been attempting to estimate the periodic contribution of an effect to some data but have not been able to fit a sine wave within R. It would be nice to start by being able to fit a sine wave with an amplitude and frequency. x<-seq(0,20,by=0.5) y<-2*sin(2*pi*.5*x) #amplitude =2, frequency=0.5 # This failed to converge r<-nls(y ~ A*sin(2*pi*F*x), start=list(A = 1, F = 1),
2011 Aug 05
1
Translate Sine Function in R?
Hello, I'm trying to generate a sine wave in R to fit my observations using the general formula: y=a*sin(b[x+h*pi)]+k where a = amplitude, b=period, h=phase shift, and k=vertical shift I want to use following translation to bring the sine function up onto the y-axis to range from 0-1, and this will place the wave on the x-axis from 0-pi/2. y=1/2sin(2[x+ 1/4*pi]) + 1/2 Additionally, I need
2010 Feb 01
1
Fwd: Re: Fixed Point on wideband-mode: Single Frame loss on 2000 Hz sine causes "freak off"
Hi Jean-Marc, my answers: see below. Any good ideas how I should proceed? Jean-Marc Valin <jean-marc.valin at usherbrooke.ca> hat am 1. Februar 2010 um 13:09 geschrieben: > Hi Frank, > > On 2010-02-01 05:56, Frank Lorenz wrote: > > I get really strange results when comparing floating and fixed point > > versions of interal variables of the ltp, so either something is
2010 Jan 13
2
Fwd: Re: Fixed Point on wideband-mode: Single Frame loss on 2000 Hz sine causes "freak off"
<body bgcolor="#ffffff" background="https://img.web.de/v/p.gif" class="bgRepeatYes" style="background-repeat: repeat; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-size: 9pt; padding-left: 0px;" ><span style="font-size: 9pt;"><span style="font-family: verdana,geneva;"><span
2010 Jan 13
1
Fwd: Re: Fixed Point on wideband-mode: Single Frame loss on 2000 Hz sine causes "freak off"
<body bgcolor="#ffffff" background="https://img.web.de/v/p.gif" class="bgRepeatYes" style="background-repeat: repeat; background-color: rgb(255, 255, 255); color: rgb(0, 0, 0); font-size: 9pt; padding-left: 0px;" ><p>Hi Jean-Marc,</p> <p>&nbsp;</p> <p>yes, I tested with floating point. It is only a fixed point
2010 Feb 01
1
Fwd: Re: Fixed Point on wideband-mode: Single Frame loss on 2000 Hz sine causes "freak off"
Hi Jean-Marc, dBFS means dB relative to digital full scale. In other words: a sine value of -42 dBFS will, on a 16 bit PCM signal, swing between 131 and -131 only (16384 * 10^(-42/20)) So we are far below +/-8000. At the moment, I'm out of ideas how to debug systematically. That even very small rounding errors alter pitch values fundamentally makes the situation worse for me, because it
2010 Jan 14
2
Fwd: Re: Fixed Point on wideband-mode: Single Frame loss on 2000 Hz sine causes "freak off"
Hi Jean-Marc, yes, problem exists in narrowband-mode, too. I already twiddled with max_gain, but did not have real success. I changed line 337 of ltp.c (function pitch_gain_search_3tap_vq) if (sum>best_sum && gain_sum<=max_gain) { to if (sum>best_sum && gain_sum<max_gain) { -- that stabilizes speex for 2000 Hz and 2200 Hz input on quality setting 7 (23800
2010 Apr 18
4
confused with yearmon, xts and maybe zoo
R-listers, I am using xts with a yearmon index, but am getting some inconsistent results with the date index when i drop observations (for example by using na.omit). The issue is illustrated in the example below. If I start with a monthly zooreg series starting in 2009, yearmon converts this to "Dec-2008". Not such a worry for my example, but strange. Having converted to xts, i drop
2010 Feb 02
1
Fwd: Re: Fixed Point on wideband-mode: Single Frame loss on 2000 Hz sine causes "freak off"
Hi Jean-Marc, I'm currently trying to analyze the LPC synthesis filter. For this, can you please tell me the exact format of the LPC coeffs (in variable interp_qlpc), please? cheers, Frank -----Urspr?ngliche Nachricht----- Von: "Frank Lorenz" <Frank_wtal at web.de> Gesendet: 02.02.10 11:00:16 An: jean-marc.valin at usherbrooke.ca CC: speex-dev at xiph.org Betreff: Re:
2016 Aug 02
3
OPUS encoding mono sine wave
I wonder if anybody try to compress a pure sine wave using OPUS codec. When I compressed the mono 1KHz, 16bits 48000 samples per sec. audio stream using the 'opus_demo' utility: opus_demo -e audio 48000 1 2min_1kHz_Sine_16bit_48kHz.wave 2min_1kHz_Sine_16bit_48kHz.opus_raw I had the output stream that is shown below. 00 00 00 01 00 00 00 00 78 00 00 00 01 00 00 00 00 78 00 00 00 01 00
2010 Jun 17
3
trigonometric regression
Suppose I do a trigonometric regression fit<-lm(y~ cf + sf) where cf and sf are the cos and sine components. b<-coef(fit) I have the fitted sine component b[2] and the cos component b[3]. Doing summary(fit) gives me the p-values and SEs for b[2] and b[3]. But I want the amplitude of the fitted waveform amp<-sqrt(b[2]^2+b[3]^2) Can someone please tell me how to get the p-value for amp?
2005 Apr 21
1
printCoefmat(signif.legend =FALSE) (PR#7802)
printCoefmat(signif.legend =FALSE) does not work properly. The option "signif.legend = FALSE" is ignored as shown in the example below. cmat <- cbind(rnorm(3, 10), sqrt(rchisq(3, 12))) cmat <- cbind(cmat, cmat[,1]/cmat[,2]) cmat <- cbind(cmat, 2*pnorm(-cmat[,3])) colnames(cmat) <- c("Estimate", "Std.Err", "Z value", "Pr(>z)") #
2011 Apr 25
1
R equivalent to (D)QDAWO in Fortran?
Hi useRs, I have a set of fortran code that was passed down from previous students, and I am converting its algorithm into R codes. I encounter this function in Fortran (D)QDAWO, which numerically integrates a function f with a user-specified cosine or sine weight. It is used because the original function that I want to integrate is f(x)*cos(x). I tried in R to directly integrate by
2007 Aug 15
2
pcspkr wave encoding
Hi, there is an interesting case when the FLAC encoder (using 1.2.0) is given simple waves. Simple waves means: I have a list of {frequency, duration, pause} tuples that define the monophonic tune. In other words, exactly one frequency is played at a time. This is the original dataset from 1989 (driving a PC speaker back then): $ ls -l ihold.sd -rw-r--r-- 1 jengelh users 20616 Aug 14 00:57