Timeline for How to LinearModelFit data like {{year,month,day,hour,minute,second,variable}}?
Current License: CC BY-SA 3.0
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 23, 2016 at 20:46 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Oct 24, 2016 at 20:45 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
| Sep 26, 2016 at 14:24 | comment | added | user42582 | @gwr: multicollinearity is a sample problem-the poster has not made the sample available-the question was about an incorrect mathematica function call, not about regression theory | |
| Sep 25, 2016 at 21:29 | comment | added | gwr | @user42582 Well, I am assuming that one of the tenets of linear regression usually is, that the predictors should be independent from each other (avoid multicollinearity). Being modular numbers imo makes hours, minutes, seconds not independent from each other. To me AbsoluteTime appears to be very relevant in the context of linear models using time as a predictor. | |
| Sep 24, 2016 at 20:22 | answer | added | murpholinox | timeline score: 1 | |
| Sep 24, 2016 at 10:23 | comment | added | user42582 | @gwr: the question presents a design matrix with 6 independent vars. LinearModelFit[data,x,x] will report an error when evaluated. Note, that the input data are already date/time components. The fact that you interpret the question as a request for providing - in addition to making the given code work - a way to acquire a date/time time-stamp is something that is not asked. As a side note, in my previous comment I said that the LinearModelFit[data,x,x] wouldn't work, not that your version wouldn't work. The fact is that using AbsoluteTime[]is not relevant in the present context | |
| Sep 23, 2016 at 21:20 | comment | added | gwr | @user42582 It will work because the values encoding time can be compared to representing a number by its digits. In the end it simply is a single value. | |
| Sep 23, 2016 at 20:02 | comment | added | user42582 | LinearModelFit[data,x,x] won't work because the number of columns in data is greater than the number of regressors (x). If you want to make this work, then you should use something like lmf=LinearModelFit[data, {x1,x2,x3,x4,x5,x6}, {x1,x2,x3,x4,x5,x6}]. Also note how your regression will contain a constant term. If you don't want that, you should include the option _IncludeConstantBasis_->False | |
| Sep 23, 2016 at 16:49 | comment | added | gwr | If not going for TimeSeriesModelFit in this case, I would use AbsoluteTime[{y,m,d,h,m,s}] to convert the times. You may then use Standardize[ {absTime1, absTime2, ...}, First, 1&] to shift the times to start with 0. | |
| Sep 23, 2016 at 16:28 | comment | added | Coolwater | For LinearModelFit[data,x,x] the data should be {{time, variable},{time2, variable2},...} so you need to manipulate data initially | |
| Sep 23, 2016 at 16:13 | review | First posts | |||
| Sep 23, 2016 at 17:16 | |||||
| Sep 23, 2016 at 16:10 | history | asked | murpholinox | CC BY-SA 3.0 |