search for: er12

Displaying 2 results from an estimated 2 matches for "er12".

Did you mean: e212
2011 Sep 08
3
How to specify a variable name in the regression formula without hard coding it
I have a matrix called mat and y is the column number of my response and x is a vector of the column numbers of my terms. The variable name of y can change, so I don't want to hardcode it. I can find out the name as follows: > names(mat)[y] [1] "er12.l" Then I can run the regression by hard coding the variable name as follows: > mod <- try(rlm(er12.l ~ ., data=mat[zidx, c(y, x)]), silent=TRUE) But how would I do so without hard coding the name er12.l? I set up a reproducible example. In the following my regression fo...
2009 Jan 21
1
Two similar zoo objects with different structures, how to get same structure?
..., "origin")= Named num [1:3] 1 1 1970 .. .. ..- attr(*, "names")= chr [1:3] "month" "day" "year" - attr(*, "dimnames")=List of 2 ..$ : NULL ..$ : chr [1:12] "ED4 COMDTY" "ED12 COMDTY" "ER4 COMDTY" "ER12 COMDTY" ... I also have a vector of dates of same length as zoo object (5219): > str(bldates) chr [1:5219] "01/01/90" "01/02/90" "01/03/90" "01/04/90" "01/05/90" "01/08/90" "01/09/90" "01/10/90" "01/11/9...