Adding my data to existing GAUSS program

Thanks a ton. I am now able to run OLS. I would appreciate you if you help me on another GAUSS code (causality test designed by Anne PEGUIN-FEISSOLLE and Timo TERASVIRTA, 2000) .
I am uploading the codes. I want to run this codes on my variables (nifty and mid). The codes are written on random variables which are generated. However, I would like to run this on my real variables. Kindly navigate me in doing this. I would be grateful to you for this.

I will assume that this code is intended to calculate the minimum number of principal component vectors needed to explain 80% (cpseuil is set to 0.8 earlier in the code) of the variance of santafe.

The second return from the GAUSS princomp function is a vector with the percent of variance explained by each principal component vector. If we apply the cumsumc function to this output, we will get a vector of cumulative variance explained. For example, if:

Now we need to select the number of principal components needed to explain at least 80% of the variance. There are any number of ways to do this, but what we will do is: 1) Create a vector of 1's and 0's with a 1 at every location that is less than or equal to 0.8. 2) Sum this vector. 3) Add one. Continuing with our example from above:

I have downloaded the code that you have given in the above link. However, I am not able to get output when I run the codes on variables. I have done up to the point; nifty=myvars[.,1], mid=[.,2]
What are the steps I need to follow after these? As I am new to Gauss, I need your kind support to run these codes, as the results are important for my study.

If you want the code to use your data, instead of the simulated data, then you need to set the variables that the code uses equal to your data. For example, assuming that earlier in the file, you loaded a column vector named nifty, and that you want vectorX to be equal to nifty instead of the simulated values, you would replace this code:

Have a Specific Question?

Need Support?

Try GAUSS for 30 days for FREE

GAUSS is the product of decades of innovation and enhancement by Aptech Systems, a supportive team of experts dedicated to the success of the worldwide GAUSS user community. Aptech helps people achieve their goals by offering products and applications that define the leading edge of statistical analysis capabilities.