beta_coefficients
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| beta_coefficients [2020/12/09 18:34] – [e.g.] hkimscil | beta_coefficients [2020/12/09 18:47] (current) – [e.g.] hkimscil | ||
|---|---|---|---|
| Line 149: | Line 149: | ||
| > | > | ||
| </ | </ | ||
| + | |||
| + | These beta coefficients also can be got from the coefficents from standardized data. | ||
| + | |||
| + | < | ||
| + | mod.formula <- sales ~ youtube + facebook + newspaper | ||
| + | all.vars(mod.formula) | ||
| + | marketing.temp <- sapply(marketing[ , all.vars(mod.formula)], | ||
| + | head(marketing.temp) | ||
| + | mod.scaled <- lm(sales ~ ., data=marketing.scaled) | ||
| + | head(marketing.scaled) | ||
| + | coefficients(mod.scaled) | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | > all.vars(mod.formula) | ||
| + | [1] " | ||
| + | > marketing.temp <- sapply(marketing[ , all.vars(mod.formula)], | ||
| + | > head(marketing.temp) | ||
| + | sales | ||
| + | [1,] 1.5481681 | ||
| + | [2,] -0.6943038 -1.19437904 | ||
| + | [3,] -0.9051345 -1.51235985 | ||
| + | [4,] 0.8581768 | ||
| + | [5,] -0.2151431 | ||
| + | [6,] -1.3076295 -1.61136487 | ||
| + | > mod.scaled <- lm(sales ~ ., data=marketing.scaled) | ||
| + | > head(marketing.scaled) | ||
| + | | ||
| + | 1 1.5481681 | ||
| + | 2 -0.6943038 -1.19437904 | ||
| + | 3 -0.9051345 -1.51235985 | ||
| + | 4 0.8581768 | ||
| + | 5 -0.2151431 | ||
| + | 6 -1.3076295 -1.61136487 | ||
| + | > coefficients(mod.scaled) | ||
| + | (Intercept) | ||
| + | -5.034110e-16 | ||
| + | > | ||
| + | > </ | ||
| + | |||
| + | check out that | ||
| + | '' | ||
| + | |||
| + | and | ||
| + | 베타를 구하고 나면 서로의 계수값을 절대비교할 수 있다. | ||
| + | '' | ||
| + | '' | ||
| + | |||
beta_coefficients.1607506444.txt.gz · Last modified: by hkimscil
