[R] LM() and time in R
drjimlemon at gmail.com
Thu Apr 30 00:59:32 CEST 2015
>From your description, it sounds like the "time" variable is actually
a vector of date strings like "30/04/2015". These will usually be
input as "factors" in R, meaning that you probably had a very large
number of categorical values instead of numeric. To find out, do this:
where "time_variable" is something like mydata$Time. If the answer is
TRUE, convert that variable to a vector of dates with as.Date and try
your analysis again.
On Thu, Apr 30, 2015 at 4:25 AM, Boris Steipe <boris.steipe at utoronto.ca> wrote:
> Have a look at the help page for the function ts()
> (type ?ts at the R prompt). Other than that, you haven't provided nearly enough information for us to diagnose your issue.
> Please see here for some hints on how to ask questions productively:
> On Apr 29, 2015, at 6:26 AM, Livia Maria Vestergaard <lvest09 at student.sdu.dk> wrote:
>> I need some help with a project that I’m working one.
>> Im trying to make a l regression model (lm) in r with time as independant variable and gas prices as the depended.
>> But It seems like everything im trying to run it, R freeze, I think that I need to tell R somehow that my time is time but how ?
>> Hope that you can help me :)
>> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help