Tuesday, 14 May 2019

Probabilistic Utility

Probabilistic Utility

install.packages("mcmc")
https://www.mathclasstutor.online

https://www.mathclasstutor.online

> data(foo)
> out <- glm(y ~ x1 + x2 + x3, family = binomial, data = foo)
> summary(out)

Call:
glm(formula = y ~ x1 + x2 + x3, family = binomial, data = foo)


Deviance Residuals:

    Min       1Q   Median       3Q
-2.0371  -0.6337   0.2394   0.6685
    Max
 1.9599

Coefficients:
            Estimate Std. Error z value
(Intercept)   0.5772     0.2766   2.087
x1            0.3362     0.4256   0.790
x2            0.8475     0.4701   1.803
x3            1.5143     0.4426   3.422
            Pr(>|z|) 
(Intercept) 0.036930 *
x1          0.429672 
x2          0.071394 .
x3          0.000622 ***
---
Signif. codes:
  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’
  0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

    Null deviance: 134.602  on 99  degrees of freedom
Residual deviance:  86.439  on 96  degrees of freedom
AIC: 94.439

Number of Fisher Scoring iterations: 5


> plot(out)
Hit <Return> to see next plot:
Hit <Return> to see next plot:

Monday, 13 May 2019

How to analyze NSEI

How to analyze NSEI

getSymbols('^NSEI',src='yahoo')
[1] "NSEI"
Warning message:
^NSEI contains missing values. Some functions will not work if objects contain missing values in the middle of the series. Consider using na.omit(), na.approx(), na.fill(), etc to remove or replace them.
> barChart(NSEI)
https://www.mathclasstutor.online

> addTA(EMA(Cl(NSEI)), on=1, col=6)
Error in EMA(Cl(NSEI)) : Series contains non-leading NAs
> addTA(OpCl(NSEI), col=4, type='b', lwd=2)
> newEMA <- newTA(EMA, Cl, on=1, col=7)
> newEMA()
> newEMA(on=NA, col=5)
> addSMA()
> addWMA()
> addDEMA()
> addEVWMA()
> addZLEMA()

Sunday, 12 May 2019

The better way to analyze a stock

The better way to analyze a stock

getSymbols('MSFT',src='yahoo')
[1] "MSFT"
> getSymbols('SBUX')
[1] "SBUX"
> barChart(SBUX)
https://www.mathclasstutor.online

https://www.mathclasstutor.online

> addTA(EMA(Cl(SBUX)), on=1, col=6)
> addTA(OpCl(SBUX), col=4, type='b', lwd=2)
> newEMA <- newTA(EMA, Cl, on=1, col=7)
> newEMA()
> newEMA(on=NA, col=5)
> barChart(MSFT)
> addTA(EMA(Cl(MSFT)), on=1, col=6)
> addTA(OpCl(MSFT), col=4, type='b', lwd=2)
> newEMA <- newTA(EMA, Cl, on=1, col=7)
> newEMA()
> newEMA(on=NA, col=5)

Latin Cubes

What is Latin Cubes? The practical applications of Latin crops and related designs are factorial experiment.factorial experiments for me...