similar to: Regression using R

Displaying 20 results from an estimated 3000 matches similar to: "Regression using R"

2009 Oct 07
1
sinusoidal relationship
Hi, Suppose x and y are vectors whose elements are known. I know that there is a sinusoidal relation between them. In other words, y=a*sin(bx) where b is probably a function of pi. How do I find a and b in R? Hakan [[alternative HTML version deleted]]
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
2008 Jun 04
2
estimate phase shift between two signals
Hi, Are there any functions in R that could be used to estimate the phase-shift between two semi-sinusoidal vectors? Here is what I have tried so far, using the spectrum() function -- possibly incorrectly: # generate some fake data, normalized to unit circle x <- jitter(seq(-2*pi, 2*pi, by=0.1), amount=pi/8) # functions defining two out-of-phase phenomena f1 <- function(x)
2008 Aug 15
1
map("state" ...) Is the USA cracking up?
Running R version 2.6.1 under Linux, I'm trying to use the maps and mapdata packages and the state database to produce a thematic map of the USA. My problem is that cracks (white spaces) appear between some states--e.g. between Colorado and Utah and between Michigan and Indiana. The resulting visual impression is that the country is breaking up. This occurs in all the projections I have
2009 Nov 30
1
regression with a*cos(angle+phi)+b
Hello, the only thing I found to fit a sin/cos is s.th like lm(a~cos+sin) But this is not what I want. I have a magnitude which is sinusoidal with offset and it doesn't start at phi=0. The data is: angle<-c(0,10,20,30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180) Voltage<-c(-45.07, -45.24, -43.61, -40.78, -36.48, -30.92, -23.83, -15.95, -7.53, 1.06, 11.24,19.85, 27.00,
2012 Jun 02
1
Determining frequency and period of a wave
Hello! I'm collecting data on a refrigerator that I'm using to cure meat. Specifically I am collection humidity and temperature readings. The temperature readings look sinusoidal (due to the refrigerator turning on and off). I'd like to calculate the frequency and period of the wave so that I can determine if modifications I make to the equipment are increasing or decreasing
2006 Jan 28
3
Creating 3D Gaussian Plot
Hello, I requested help a couple of weeks ago creating a dipole field in R but receieved no responses. Eventually I opted to create a 3d sinusoidal plot and concatenate this with its inverse as a means for a "next best" situation. It seems that this isn't sufficient for my needs and I'm really after creating a continuous 3d gaussian mesh with a "positive" and
2011 May 31
2
newbie: fourier series for time series data
Hi Guys, I had a monthly time series's data of land temperature from 1980 to 2008. After plotting a scatter diagram, it seems that annually, there is a semi sinusoidal cycle. How do I run Fourier's series to the data so that I can fit model on it? I am really sorry for my question sound stupid, but I just don't know where to start. I am desperately looking for help from you guys.
2016 Apr 23
1
Plotting a large time series
I have a time series with many millions of points. Each point is of the form (time, value) but where the value is 0 there is no record - ie the data set is sparse. If I plot this using plot(myData) I get a correct plot going from time 0 to time 7x10e7. Given that there are many millions of points (it's not *that* sparse), this looks very busy. But if I attempt to plot this as a line -
2012 Apr 09
0
Question on harmonic (Fourier) analysis of sinusoidal time series
Hello, I will try to explain the problem, sorry if it will be a little long... I'm using R to analyze results of cyclic mechanical testing, like this: - apply quasi-sinusoidal load - measure quasi-sinusoidal vertical and horizontal deformations (quasi-sinusoidal load means that load "should be" sinusoidal, but testing machine puts in some noise...) I enclose a sample of data at
2011 Jan 10
1
Cosinor en R
Hola a todos, es la primera vez que escribo a la lista, espero explicarme correctamente. Trabajo en cronobiología de mamíferos y quiero comenzar a analizar mis datos con R (haciendo análisis de varianza ya llevo unos años en el entorno). Me interesa saber si cada una de mis variables podría ajustarse a una función sinusoidal; tengo medidas cada dos horas para cada una. Querría extraer el mesor y
2005 Feb 08
5
How to get variable names in a function?
Hello, applying a function to a list of variables I face the following problem: Let's say I want to compute tables for several variables. I could write a command for every single table, like bravo<-c(1,1,2,3,5,5,5,);charly<-c(7,7,4,4,2,1) table(bravo); table(charly) > table(bravo); table(charly) bravo 1 2 3 5 2 1 1 3 charly 1 2 4 7 1 1 2 2 The results are two tables with the
2009 Apr 09
2
how to automatically select certain columns using for loop in dataframe
Hi, I am trying to display / print certain columns in my data frame that share certain condition (for example, part of the column name). I am using for loop, as follow: # below is the sample data structure all.data <- data.frame( NUM_A = 1:5, NAME_A = c("Andy", "Andrew", "Angus", "Alex", "Argo"), NUM_B = 1:5, NAME_B =
2011 Aug 04
2
survival probability estimate method
Hi, I was reading a paper published in JCO "Prediction of risk of distant recurrence using 21-gene recurrence score in node-negative and node-positive postmenopausal patients with breast cancer treated with anastrozole or tamoxifen: a TransATAC study" (ICO 2010 28: 1829). The author uses a method to estimate the 9-year risk of distant recurrence as a function of continuous recurrence
2005 Mar 30
6
French Curve
Dear R experts, Did someone implemented French Curve yet? Or can anyone point me some papers that I can follow to implement it? thanks in advance for your help. Paul
2011 Apr 14
7
[OT] ups advice
Hi I have a Dell PowerEdge T310 *tower* server.. I have to buy an ups by apc... anyone could help me giving an hint ? a simple "smart ups 1000" could be enough ? thx so much!! lewis.
2015 Oct 08
1
Tranformar falsas variables char en numéricas
Hola, Una manera muy sencilla de hacerlo es esta: #------------------------------- whatcol <- 0 for(i in 1:ncol(d)){ whatcol[i] <-class(d[,i]) } whatcol #-------------------------------- > whatcol <- 0 > for(i in 1:ncol(d)){ + whatcol[i] <-class(d[,i]) + } > whatcol [1] "character" "character" "factor" "factor"
2015 Oct 08
3
Tranformar falsas variables char en numéricas
Hola usuarios de R, Antes de nada presentarme, soy nuevo en R (antiguo... y bueno actual usuario de SAS), llevo menos de un mes y estoy intentando empezar con pequeñas cosas. Hay un tema que me está llevando bastante tiempo y por más que investigo y hago pruebas no logro saber como se hace; veréis tengo un data.frame el cuál tiene bastante variables y todas ellas clasificadas como char, sin
2012 Jun 13
3
How to plot linear, cubic and quadratic fitting curve in a figure?
Hi R experts, Could you please help me to fit a linear, cubic and quadratic curve in a figure? I was trying to show all these three fitting curves with different colour in one figure. I spent substantial time to figure it out, but I could not. I have given here a example and what I did for linear, but no idea for cubic and quadratic fitting curve > dput(test) structure(list(sp = c(4L, 5L,
2006 Jun 21
3
sort matrix by sum of columns
Hi all, I would like to know how can I sort the cols of a matrix by the sum of their elements. a <- matrix(as.integer(rnorm(25,4,2)),10,5) colnames(a) = c("alfa","bravo","charlie","delta","echo") I guess I should use colSums, and then rearrange the matrix somehow according to the result. My idea is to display a "sorted" barplot: