Recent content by sak

  1. S

    ROC function from TTR Package

    I was trying to verify how well the lag-returns are calculated from ROC function in TTR package. Following is the code that I am using: library(quantmod) library(TTR) startDate = "2001-01-01" endDate = "2013-12-01" getSymbols("VXX",src="yahoo",return.class='xts',from=startDate...
  2. S

    anova error (Error in `contrasts<-`)

    I am trying to find joint F-statistics and since this is a question regarding usage of R, I would not spend time on logic of it but this is what I am trying to achieve: Set11 = read.table("D1.csv",sep=",",header=TRUE) ##change attached xlsx to csv Set21 =...
  3. S

    Comparing and counting sign of elements in two matrics

    I have two giant matrices (5000x6000) each. I want to compare the sign of elements of two matrices without doing a for loop kind of thing. And then I want to count how many had the matching sign. I did find ways to compare whether two are identical but couldn't find anything which can do the...
  4. S

    Regression Question

    I have the following system: X(k) = alpha*trueVal(k) + Noise //Volume measurement Y(k) = beta*X(k) + Noise //Pressure measurement k = day1, day2, day3, etc In my system I measure the volume about 2 hours before the pressure measurement. So, basically I...
  5. S

    p-value and significance level

    In 1 sample t-test, where null: mean of sample is zero, I would think a high p-value like 0.30 would imply that null can't be rejected at 5% significance level. However, p-value of 0.012 would imply null will be rejected at 5% significance level but not at 1% significance level. So, I am...
  6. S

    5% vs 10% significance level

    For hypothesis testing which one is considered stricter 5% significance level or 10% significance level. I know its a very basic question but it is bothering me. Thanks
  7. S

    Selecting elements within 1 standard deviation from a Matrix

    Hi guys, I have a matrix of 7 columns and each of these columns represent different variables. I want to create 7 new vectors and each will just have elements within 1 standard deviation across mean. So, each vector would be of different dimension. My idea will work but I am sure there are...
  8. S

    Data Normalization

    I have a very basic question. When we are regressing Y on X1, X2, X3, I understand we need to perform some kind of normalization for X1, X2, X3 columns but what about Y. Do we need to normalize that as well while running regression? Thanks
  9. S

    Random Forest Data Requirements

    I have tried looking into various papers but I have not been able to get an authentic information. Does regression using Random forest have any requirements over the data like we hvae homoskedasticity for linear regression, etc. ?
  10. S

    Handling very large (21 million rows) arrays in R

    I have an array of size 21,415,715 X 18 which I am trying to import through ODBC database. But R is not able to load it. How should I handle it? Or is R not good enough for such massive data?
  11. S

    Distribution of coefficients in regression

    When I get the regression equation y = a.x + b by regressing y on x, how do I find and plot the distribution of a?
  12. S

    Write Array to Excel in R

    How do I write an array to .xlsx file. I want to do it in a loop and would like to write it in same sheet.
  13. S

    Creating a variable using string names in R

    I want to create a variable name from string names. E.g. The Array has columns named as price, temperature, pressure. Vector <- function(Array,string) { Vector = Array$string } So, when I make the following call: v1 = Vector(giantArray,'temperature') #extracts temperature column...
  14. S

    [Matlab] - Getting Index

    I have an giant array (30000 x 9) and I want to know the exact location of a certain number. Is there anything like find function in matlab to do this without looping?
  15. S

    Concatenating Vector of Strings in R

    I have a vector (Label) of length 500 with first few elements as: AAA ABM ACD ADR I want to create a new vector (NewLabel) such that it's elements are: AAA_trades.dat ABM_trades.dat ACD_trades.dat ADR_trades.dat basically add the string "_trades.dat" to each element of vector...