Re: [R] Dummy variable in ARIMA

2015-03-02 Thread Jose Iparraguirre
project.org] On Behalf Of Mikael Olai Milhøj Sent: 26 February 2015 16:03 To: r-help@r-project.org Subject: [R] Dummy variable in ARIMA Hi all I have been searching on the web in vain. I want to include a dummy variable in my ARIMA model. Let's say that I want to make an AR(1) model for

Re: [R] Dummy variable in ARIMA

2015-02-26 Thread Bert Gunter
Dig deeper. -- Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." Clifford Stoll On Thu, Feb 26, 2015 at 8:29 AM, Mikael Olai Milhøj wrote: > Hi. > > First of all, thx. But when

Re: [R] Dummy variable in ARIMA

2015-02-26 Thread peter dalgaard
> On 26 Feb 2015, at 17:29 , Mikael Olai Milhøj wrote: > > Hi. > > First of all, thx. But when using in arima(...xreg=fact,...) then fact > should be a vector and not a factor variable? Maybe I should have been more > clear in my first mail, sorry. Or else I have to dig deeper into factors. >

Re: [R] Dummy variable in ARIMA

2015-02-26 Thread Mikael Olai Milhøj
Hi. First of all, thx. But when using in arima(...xreg=fact,...) then fact should be a vector and not a factor variable? Maybe I should have been more clear in my first mail, sorry. Or else I have to dig deeper into factors. /Mikael On Thu, Feb 26, 2015 at 5:17 PM, Bert Gunter wrote: > Inline

Re: [R] Dummy variable in ARIMA

2015-02-26 Thread Bert Gunter
Inline. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 "Data is not information. Information is not knowledge. And knowledge is certainly not wisdom." Clifford Stoll On Thu, Feb 26, 2015 at 8:02 AM, Mikael Olai Milhøj wrote: > Hi all > > I have been searching on

[R] Dummy variable in ARIMA

2015-02-26 Thread Mikael Olai Milhøj
Hi all I have been searching on the web in vain. I want to include a dummy variable in my ARIMA model. Let's say that I want to make an AR(1) model for X including a dummy variable which should be 1 for observation 4,5,6 and zero otherwise (let's say that there is 50 observations in total). How do

Re: [R] Dummy Variable : Doubt

2012-09-20 Thread Eva Prieto Castro
Sorry, I could write Dummy and not Gummy. Regards --- El jue, 20/9/12, Eva Prieto Castro escribió: De: Eva Prieto Castro Asunto: Gummy Variable : Doubt Para: R-help@r-project.org Fecha: jueves, 20 de septiembre, 2012 11:13 Hi,   I have a system in which I analyze 2 subjects and 1 vari

Re: [R] dummy variable

2012-07-24 Thread saraberta
oh god, thanks!now it looks so simple!! -- View this message in context: http://r.789695.n4.nabble.com/dummy-variable-tp4637347p4637574.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.e

Re: [R] dummy variable

2012-07-22 Thread peter dalgaard
On Jul 22, 2012, at 14:45 , Rui Barradas wrote: > Hello, > > See if this is it. > > > returns <- rnorm(10) > dummy <- ifelse(returns < 0, -1, 0) Sara had "1 if results are negative", so lose the minus. It is easier just to say dummy <- as.numeric(returns < 0) -pd > > > Hope this helps

Re: [R] dummy variable

2012-07-22 Thread Bert Gunter
Sara: Are you sure?? I am wholly unfamiliar with garch, but in general, R does not need dummy variables at all. You make your covariate a factor with appropriate contrasts and then write an appropriate model formula, in this case, with an interaction with your series. I could be wrong in this cas

Re: [R] dummy variable

2012-07-22 Thread Rui Barradas
Hello, See if this is it. returns <- rnorm(10) dummy <- ifelse(returns < 0, -1, 0) Hope this helps Rui Barradas Em 22-07-2012 08:53, saraberta escreveu: Hi, i need a little help! i must create a dummy variable to insert as external regressor in the variance equation of a garch model; this

[R] dummy variable

2012-07-22 Thread saraberta
Hi, i need a little help! i must create a dummy variable to insert as external regressor in the variance equation of a garch model; this dummy is referred to the negative sign of returns of an asset, so it has to be 1 when returns are negative and 0 when they are positive, and in my model the dummy

[R] Dummy variable regression

2011-08-23 Thread Marcin P?�ciennik
Dear list members, I want to apply AR(1)-GARCH(1,1) model in order to conduct a test of structural shifts in conditional correlations which I previously estimated. To be more exact, first, I estimate the conditional correlations using the DCC-GARCH model. Now I want to check whether these correla

Re: [R] dummy variable encoding

2009-03-06 Thread Richard . Cotton
> > The best encoding depends upon which language you would like to manipulate > > the variable in. In R, genders are most naturally represented as factors. > > That means that in an external data source (like a spreadsheet of data), > > you should ideally have the gender recorded as human-

Re: [R] dummy variable encoding

2009-03-05 Thread news
richard.cot...@hsl.gov.uk writes: > The best encoding depends upon which language you would like to manipulate > the variable in. In R, genders are most naturally represented as factors. > That means that in an external data source (like a spreadsheet of data), > you should ideally have the g

Re: [R] dummy variable encoding

2009-03-05 Thread Richard . Cotton
>can anyone tell me why an encoding of 1/2 for a dummy variable for >two groups (e.g. gender) seems to be preferred over 0/1? >It's been bugging me for a while, 0/1 seems more natural, but I have >been told (without explanation) that 1/2 is better. Why? The best encoding depends up

[R] dummy variable encoding

2009-03-05 Thread news
Hi, can anyone tell me why an encoding of 1/2 for a dummy variable for two groups (e.g. gender) seems to be preferred over 0/1? It's been bugging me for a while, 0/1 seems more natural, but I have been told (without explanation) that 1/2 is better. Why? -- aleblanc __