search for: holder2

Displaying 1 result from an estimated 1 matches for "holder2".

Did you mean: holders
2012 Jan 28
0
Graph Titles
...for loop that loops through a matrix and pulls data from two > different variables, computes differences and runs a regression then plots > a formula I made: > > for(i in 1:1){ > halo <- sex[i,] > holder <- get(halo)['2011::'][,6] > halo2 <- sex[i,2] > holder2 <- get(halo2)['2011::'][,6] > ret1<- diff(holder)[-1] > ret2<- diff(holder2)[-1] > model<- lm(ret1 ~ ret2 - 1) > hr <- as.numeric(model$coefficients[1]) > pairs <- ret1 - hr * ret2 > plot(pairs) > } > > The loop works fine and the appropriate nu...