search for: returns2

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

Did you mean: returns
2011 Apr 10
5
Question about levels/as.numeric
...ill new to R and this is my first post on this mailing-list. I have two .csv (each one being a column of real numbers) coming from the same database (the first one is just longer than the second) and I read them in R the following way: returns <- read.csv("test.csv", header = FALSE) returns2 <- read.csv("test2.csv", header = FALSE) However, the two objects clearly don't seem to be equivalent: > returns[2528:2537,1] [1] -0.002206 0.115696 -0.015192 0.008719 -0.004654 -0.010688 0.009453 0.002676 0.001334 -0.011326 7470 Levels: -0.000078 -0.000085 -0.000086 -0....
2009 Mar 23
1
Basic regression output question
...particular column or row, how do I do this? Code such as (coef(summary(lm(t(returns)~factors)))[50])[1,4], which works when I have only one response variable, returns me an error. Thanks in advance Lewis EXAMPLE CODE factors<-matrix(runif(400),nrow=40) returns1<-matrix(runif(40),nrow=1) returns2<-matrix(runif(2000),nrow=50) coef(summary(lm(t(returns1)~factors)))[1,4] [1] 0.01062590 (coef(summary(lm(t(returns2)~factors)))[50]) Response Y50 : Estimate Std. Error t value Pr(>|t|) (Intercept) 0.54829326 0.3230444 1.69726923 0.1003545 factors1 0.08225028 0.1...