Skip to content

Commit

Permalink
Used Google Sheets to tweak the correlation between datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
Evan-CTL committed Dec 19, 2024
1 parent 059127f commit 0726a53
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
30 changes: 16 additions & 14 deletions media/js/src/simulations/simulation3/generatedData.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,27 @@
"yRange": [47.382,203.066]
},
"x2": {
"data": [40.96,80.0,88.32,108.16,117.12,115.84,126.72,113.28,94.08,50.56,64.0,91.52,103.68,74.24,59.52,65.28,71.68,105.6,109.44,69.12,112.0,60.16,108.8,42.88,109.44,101.12,120.96,41.6,49.92,67.2,50.56,88.96,87.04,113.28,83.2,75.52,151.04,81.92,89.6,99.2,56.96,62.72,103.68,67.84,94.08,62.08,122.88,125.44,53.76,69.12],
"slope_x1": 0.642,
"slope_x2": 0.411,
"intercept": -10.546,
"rvalue": 0.731,
"data": [40,120,88,108,115,100,126,113,94,50,64,91,103,74,59,65,90,105,100,69,112,60,108,42,110,130,123,41,25,65,45,50,87,50,83.2,75.52,151.04,81.92,89.6,99.2,66,62.72,103.68,67.84,94.08,62.08,45,125.44,53.76,69.12],
"slope_x1": 1.017,
"slope_x2": -0.200,
"intercept": -8.894,
"rvalue": 0.734,
"corr_x1": 0.802,
"pvalue": 0,
"stderr": [0.100,0.009],
"yRange": [30.549,140.994]
"stderr": [0.206,0.297],
"yRange": [56.172,231.039]
},
"x3": {
"data": [5.76,11.25,12.42,15.21,16.47,16.29,17.82,15.93,13.23,7.11,9.0,12.87,14.58,10.44,8.37,9.18,10.08,14.85,15.39,9.72,15.75,8.46,15.3,6.03,15.39,14.22,17.01,5.85,7.02,9.45,7.11,12.51,12.24,15.93,11.7,10.62,21.24,11.52,12.6,13.95,8.01,8.82,14.58,9.54,13.23,8.73,17.28,17.64,7.56,9.72],
"slope_x1": 0.898,
"slope_x2": 0.081,
"intercept": -10.547,
"data": [379,451,539,696,245,342,950,594,212,695,8,953,435,237,501,659,216,432,983,574,523,327,325,824,153,907,759,403,554,904,527,132,307,216,736,127,536,272,750,218,225,775,492,750,243,167,865,530,780,871],
"slope_x1": 0.906,
"slope_x2": -0.002,
"intercept": -9.556,
"rvalue": 0.731,
"corr_x1" : 0.054,
"pvalue": 0,
"stderr": [0.072,0.046],
"yRange": [46.917,201.349]
"stderr": [0.124,0.019],
"yRange": [48.421,204.233]
},
"xRange": [64,236],
"y": [51,109,58,133,129,125,175,133,194,52,66,150,100,63,92,4,95,118,183,47,160,120,184,35,194,158,156,16,47,126,63,161,74,194,158,106,179,97,56,125,55,32,73,114,106,129,159,177,123,103]
}
}
4 changes: 2 additions & 2 deletions media/js/src/simulations/simulation3/simulationThree.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ export const SimulationThree = () => {
<ul>
{[
`corr(y, x_1) = ${DATA.x1.rvalue}`,
`corr(x_1, x_2) = ${DATA.x2.rvalue}`,
`corr(x_1, x_2) = ${DATA.x2.corr_x1}`,
`SE(\\hat \\beta_1) HTS-robust =
${DATA.x2.stderr}`,
`corr(x_1, x_3) = ${DATA.x3.rvalue}`,
`corr(x_1, x_3) = ${DATA.x3.corr_x1}`,
`SE(\\hat \\beta_1) HTS-robust =
${DATA.x3.stderr}`
].map((fx,idx) => (
Expand Down

0 comments on commit 0726a53

Please sign in to comment.