Sunday, July 2, 2017

Linear Regression Notes

How to Replicate Example 10.1 in Statistics... by Mendenhall et al, 5th Ed, in R:

Y <- c(1,1,2,2,4)
X <- c(1,2,3,4,5)
fit <- lm(Y ~ X)
plot(X,Y,xlim=c(0,5),ylim=c(-1,4))
abline(fit)

> lm(Y ~ X)

Call:
lm(formula = Y ~ X)

Coefficients:
(Intercept)            X 
       -0.1          0.7

> plot(X,Y,xlim=c(0,5),ylim=c(-1,4))
> abline(fit)



> summary(fit)

Call:
lm(formula = Y ~ X)

Residuals:
         1          2          3          4          5
 4.000e-01 -3.000e-01 -6.891e-17 -7.000e-01  6.000e-01

Coefficients:
            Estimate Std. Error t value Pr(>|t|) 
(Intercept)  -0.1000     0.6351  -0.157   0.8849 
X             0.7000     0.1915   3.656   0.0354 *
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Residual standard error: 0.6055 on 3 degrees of freedom
Multiple R-squared: 0.8167,    Adjusted R-squared: 0.7556
F-statistic: 13.36 on 1 and 3 DF,  p-value: 0.03535

Link used for reference:
Using R for Linear Regression<http://www.montefiore.ulg.ac.be/~kvansteen/GBIO0009-1/ac20092010/Class8/Using%20R%20for%20linear%20regression.pdf>
<http://www.statmethods.net/advgraphs/axes.html>
<http://www.dummies.com/programming/r/how-to-add-variables-to-a-data-frame-in-r/>

Thursday, June 29, 2017

Logististic Regression Notes

Logistic regression in R 3.4.0

https://rdrr.io/cran/rms/man/lrm.html


How to perform a logistic regression in R

https://www.r-bloggers.com/how-to-perform-a-logistic-regression-in-r/

Statistics 101: Logistic Regression
https://www.youtube.com/watch?v=zAULhNrnuL4&list=PLIeGtxpvyG-JmBQ9XoFD4rs-b3hkcX7Uu

Logistic Regression in R (r-tutor)
http://www.r-tutor.com/elementary-statistics/logistic-regression

Logistic regression (with R) by Christopher Manning
https://nlp.stanford.edu/manning/courses/ling289/logistic.pdf
for the data see: https://nlp.stanford.edu/manning/courses/ling289/

Wednesday, June 21, 2017

Using JSRender to render a CSS grid layout

This was produced by this code: https://gist.github.com/bshambaugh/c17ff5b1efc8065517bedc398a0c4483

Thursday, June 15, 2017

Link to 2011 Require.js MVC tutorial


From the example below, showing local storage:

http://verekia.com/requirejs/build-simple-client-side-mvc-app-require-js/


Addition (June 17, 2017):




See also jquery templates: https://github.com/BorisMoore/jquery-tmpl ,https://github.com/borismoore/jsrender , https://github.com/janl/mustache.js ... and other template mentioned on http://verekia.com .

Tuesday, June 6, 2017

won: apples to apples - 2nd try

This is an example of one user publishing a need, and another user satisfying it. Screenshots, which become larger upon clicking upon them, are shown. Apples are used for the example.


A client side certificate is asked for. For the meantime, I believe this should be ignored (canceled) as none are valid. However, chosing one could be okay too based on visiting the data folder (and perhaps documentation somewhere). I believe solid.mit.edu uses a similar authentication scheme, although the chosen cert matters to solid (but maybe less so in the future since they are emphasizing OpenIDConnect).


Interestingly, later when I try to download a need with wget, I get complaints about a self signed certificate, so an in-browser complaint does not seem that peculiar. See this gist for an in-browser example:
Note: Apples to Apples is a trademark for a game.