Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-14 Thread David Winsemius
> On May 14, 2017, at 11:43 AM, Tobias Christoph > wrote: > > Hey Peter, > > it is not necessary to use "factor(town)". I can just use "town" as the name > of the towns is already numeric. > Isn't it a discrete variable? You most probably do want a different

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-14 Thread Tobias Christoph
Hey Peter, it is not necessary to use "factor(town)". I can just use "town" as the name of the towns is already numeric. Am 14.05.2017 um 20:24 schrieb peter dalgaard: On 14 May 2017, at 10:22 , Tobias Christoph wrote: Hey David, when I used your suggested

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-14 Thread peter dalgaard
> On 14 May 2017, at 10:22 , Tobias Christoph wrote: > > Hey David, > > when I used your suggested formula: plm( log(revenue) ~ log(supply) + > factor(town) + as.numeric(as.character(year)), data=R_Test_log_Neu) I will > get the same results as without considering

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-14 Thread Tobias Christoph
Hey David, when I used your suggested formula: *plm( log(revenue) ~ log(supply) + factor(town) + as.numeric(as.character(year)), data=R_Test_log_Neu) *I will get the same results as without considering town and year in the formula. So this might not the clue for taking into account a linear

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-13 Thread David Winsemius
gt; >>> >>> >>> Am 11.05.2017 um 23:17 schrieb David L Carlson: >>>> What Rui said, but as important, you have four columns in your data called >>>> "town", "year", "revenue", and "supply". You do not hav

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-13 Thread Tobias Christoph
, and "supply". You do not have a column called >>> "time". >>> >>> - >>> David L Carlson >>> Department of Anthropology >>> Texas A University >>> College Station, TX 77840-4352 >&

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-13 Thread Tobias Christoph
Hey David, thanks for your reply. Maybe the time -function is related to the plm-package. In R the function of time is declared as the following: Sampling Times of Time Series Description |time|creates the vector of times at which a time series was sampled. |cycle|gives the

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-12 Thread peter dalgaard
id L Carlson >> Department of Anthropology >> Texas A University >> College Station, TX 77840-4352 >> >> -Original Message- >> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Rui Barradas >> Sent: Thursday, May 11, 2017 3:36 PM >&

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-12 Thread David Winsemius
ot;, and "supply". You do not have a column called >> "time". >> >> - >> David L Carlson >> Department of Anthropology >> Texas A University >> College Station, TX 77840-4352 >> >> -----Or

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-12 Thread Rui Barradas
-boun...@r-project.org] On Behalf Of Rui Barradas Sent: Thursday, May 11, 2017 3:36 PM To: Tobias Christoph<s3toc...@uni-bayreuth.de>; Duncan Murdoch<murdoch.dun...@gmail.com>;r-help@r-project.org Subject: Re: [R] Error: invalid type (closure) for the variable 'time' - object specific

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-12 Thread Tobias Christoph
;s3toc...@uni-bayreuth.de>; Duncan Murdoch > <murdoch.dun...@gmail.com>; r-help@r-project.org > Subject: Re: [R] Error: invalid type (closure) for the variable 'time' - > object specific trend > > Hello, > > A closure is, like you say, a function. > At an R prompt

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-11 Thread David L Carlson
Texas A University College Station, TX 77840-4352 -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Rui Barradas Sent: Thursday, May 11, 2017 3:36 PM To: Tobias Christoph <s3toc...@uni-bayreuth.de>; Duncan Murdoch <murdoch.dun...@gmail.com>; r-he

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-11 Thread Rui Barradas
Hello, A closure is, like you say, a function. At an R prompt try: > typeof(time) [1] "closure" So like Duncan suggested rename 'time', for instance capitalize it 'Time'. That should do it. Hope this helps, Rui Barradas Em 11-05-2017 21:20, Tobias Christoph escreveu: Hey Duncan, thank

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-11 Thread Tobias Christoph
Hey Duncan, thank you very much for your quick reply. _My data used:_ 1st column(town):1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,...,11 2nd column(year):1,2,3,4,5,6,7,8,9,10,11,12,1,2,3...,12 3rd column (revenue): 4th colum (supply): I have now renamed my colums and did the regression

Re: [R] Error: invalid type (closure) for the variable 'time' - object specific trend

2017-05-11 Thread Duncan Murdoch
On 11/05/2017 9:37 AM, Tobias Christoph wrote: Hey, I just have trouble adding a object specific time trend with the plm-package. I recieve the following error: * **"Error in model.frame.default(terms(formula, lhs = lhs, rhs = rhs, data = data, : invalid type for the variable 'time' "* I used