Hello,
I am trying to run a z-test on the mean of a variable of a portfolio (top 10 percent of an index) compared to the mean of a benchmark (the index).
The portfolio is created using a binary variable with a 1 if it is a part of the portfolio and otherwise 0, this column is being called PB10.
Using the command; ztest gendivY, by(PC10) - the following output is presented
ztest gendivY, by(PB10)
Two-sample z test
------------------------------------------------------------------------------
Group | Obs Mean Std. Err. Std. Dev. [95% Conf. Interval]
---------+--------------------------------------------------------------------
0 | 536,150 22.02248 .0013657 1 22.0198 22.02516
1 | 60,132 27.14717 .004078 1 27.13918 27.15516
---------+--------------------------------------------------------------------
diff | -5.12469 .0043006 -5.133119 -5.116261
------------------------------------------------------------------------------
diff = mean(0) - mean(1) z = -1.2e+03
Ho: diff = 0
Ha: diff < 0 Ha: diff != 0 Ha: diff > 0
Pr(Z < z) = 0.0000 Pr(|Z| > |z|) = 0.0000 Pr(Z > z) = 1.0000
In this test the portfolio(1) is compared to the rest (the 0), but not compared to the benchmark which would be PB10(1+0). Is there any way in which I can run a z-test testing the portfolio against the whole benchmark?
Thank you very much in advance!
Related Posts with Z-test for a portfolio and a benchmark
predict after xtlogit with fixed effectI am running a two-stage regression to account for the endogeneity issue. In the first stage I use x…
reshape help - error 101 variable already definedHi, I am trying to reshape this data, so that I have Country and Year both as a Columns. I imported …
Plotting adjusted means as a bar graphHi, I am trying to plot the adjusted means (in the form of a bar graph as both predictors are categ…
How to generate years of education in this case?Dear all, I am trying to generate years of education variable. Although I have seen some relevant t…
Rename help: can I reapply existing variable names with a suffix?I've been given some wide panel data where the names of the first 28 variables were simply repeated …
Subscribe to:
Post Comments (Atom)
0 Response to Z-test for a portfolio and a benchmark
Post a Comment