04-04-2018 01:43 PM - edited 04-04-2018 04:35 PM
I'm a novice user and I have a return data set with Company, Date and Return. I would like to calculate the p-value of each company from the returns, the hypothesis is return = 0.
I have looked at a few documents about proc reg, freq, corr, mean, sql but have not found (or probably overlooked) the solution. I would really appreciate any suggestions.
Attached please find the data file I am working on.
Thank you very much in advance!
04-04-2018 01:54 PM
P-values imply a statistical test - which statistical test are you undertaking? What's your hypothesis and how are you testing it?
These aren't really SAS questions by the way, they're methodology questions that only you can really answer.
If the hypothesis is return = 0, why not just run a proc means? OR are you testing this by company?
proc univariate data=sashelp.class mu0=0; var weight; run;
|Tests for Location: Mu0=0|
|Student's t||t||19.1449||Pr > |t|||<.0001|
|Sign||M||9.5||Pr >= |M|||<.0001|
|Signed Rank||S||95||Pr >= |S|||<.0001|
04-04-2018 02:03 PM - edited 04-04-2018 04:36 PM
Thank you for your kind reply. To answer your question, I am actually testing a few hypotheses, including return, a regressed string of alphas from the CAPM model, and the t-value of each of these alphas. I am testing by company.
I am expecting to get a string of two-tailed p-value of each company for 3 statistics return, alpha and t-value of alpha.
Please let me know if I can provide any further information. I will try the codes your provided and see if it works.
Thank you very much.
04-04-2018 03:08 PM
I am expecting to get a string of two-tailed p-values to match each return, alpha and t-value of alpha.
Calculating things are easy, if you know the rules.
How would you calculate a p-value for each return? I have no idea of what your data looks like but I assumed you had company name, the date and return somehow calculated for that date. For a statistical test, you need more than a single data point. And what's alpha? This may be subject specific term, but my finance is pretty rusty these days.
04-04-2018 04:34 PM
Thank you for your kind reply. I have reviewed and realized I need to calculate alpha for each company. My alphas and t-statistics calculated and are just other 2 statistics to evaluate return.
My apologies for my misunderstanding.
My data like you said has company, date and a calculated return. Alphas and their t-values are calculated later. I expect to estimate p-values for each of these 3 statistics.
My literal instruction was to calculate the two-sided p-values, in a format of a string data. I'd appreciate your suggestions.
Thank you very much.