How to derive standard deviation from standard error

Algorithm:

SD=Standard error * sqrt(N);

 

Reference:

http://handbook.cochrane.org/chapter_7/7_7_3_2_obtaining_standard_deviations_from_standard_errors_and.htm

 

QC: I checked the algorithm using SAS.  The result was consistent with the algorithm (i.e., SD=standard error*sqrt(N)).

proc means data=sashelp.class mean std stderr n;
var height;
run;

ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ
Mean 62.3368421

SD 5.1270752

Stadard Error 1.1762317

N 19
ƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒƒ

Open source softwares

 

--Python 3.5

https://www.python.org/downloads/

--PHP & MySQL (from WampServer)

http://www.wampserver.com/en/

Statistical Analysis Program

--R

https://cran.cnr.berkeley.edu/

--GPower

http://www.gpower.hhu.de/en.html

--Optimal Design

https://sites.google.com/site/optimaldesignsoftware/home

Editing Programs

-- NotePad++

https://notepad-plus-plus.org/download/v7.1.html

--Sigil

https://github.com/Sigil-Ebook/Sigil/releases/tag/0.9.6 (There is a link to the exe file at the bottom of the page.

Code Academy PHP problem sets

<html>
<p>
<?php
// Create an array and push on the names
// of your closest family and friends
$fam=array();
array_push($fam,"Jeana");
array_push($fam,"Niko");
array_push($fam,"Kaz");
array_push($fam,"Hiroko");
array_push($fam,"Yoko");
print count($fam);
$n_elements=count($fam);
// Sort the list
sort($fam);
// Randomly select a winner!
$roll=rand(1,$n_elements);
print $roll;
$which_person= $array[$roll];
print $which_person;
// Print the winner's name in ALL CAPS
$which_person2=strtoupper($which_person);
print $which_person2;

?>
</p>
</html>

 

 

<html>
<p>
<?php
// Create an array with several elements in it,
// then sort it and print the joined elements to the screen
$array=array(4,3,2,5);
sort($array);
print join(",", $array);
?>
</p>
<p>
<?php
// Reverse sort your array and print the joined elements to the screen

rsort($array);
print join(",",$array);

?>
</p>
</html>

 

 

http://www.w3schools.com/php/php_echo_print.asp

<!DOCTYPE html>
<html>
<head>
<title>Your own do-while</title>
<link type='text/css' rel='stylesheet' href='style.css'/>
</head>
<body>
<?php
//write your do-while loop below
do {
$roll=rand(1,6);
echo "$roll";
} while ($roll !=6);

?>
</body>
</html>

 

FUNCTIONS

$length=strlen("kazuaki");
print $length;

 

<html>
<p>
<?php
// Get a partial string from within your own name
// and print it to the screen!

?>
</p>
<p>
<?php
// Make your name upper case and print it to the screen:
$myname="Kaz";
$uppercase=strtoupper($myname);
print $uppercase;
?>
</p>
<p>

<?php
// Make your name lower case and print it to the screen:
$lowercase = strtolower($uppercase);
print $lowercase;
?>
</p>
</html>

 

 

 

<html>
<p>
<?php
// Get a partial string from within your own name
// and print it to the screen!
$myname="Kazuaki";
$partial = substr($myname, 0, 3);
print $partial;
?>
</p>

<p>
<?php
// Make your name upper case and print it to the screen:
$uppercase=strtoupper($partial);
print $uppercase;
?>
</p>

<p>

<?php
// Make your name lower case and print it to the screen:
$lowercase = strtolower($uppercase);
print $lowercase;
?>
</p>
</html>

 

 

<html>
<p>
<?php
// Print out the position of a letter that is in
// your own name
$x=strpos("kazuaki","u");
print $x;
?>
</p>
<p>
<?php
// Check for a false value of a letter that is not
// in your own name and print out an error message
if (strpos("kazuaki","x")===false){
print "Sorry, no x in the name kazuaki";
}
?>
</p>
</html>

 

 

<html>
<p>
<?php
// Use rand() to print a random number to the screen
print rand();
?>
</p>
<p>
<?php
// Use your knowledge of strlen(), substr(), and rand() to
// print a random character from your name to the screen.
$length=strlen("kazuaki");
//print $length;
$random_n=rand(1,$length);
//print $random_n;
$random_letter=substr("kazuaki",$random_n-1,1);
print $random_letter;

?>
</p>
</html>

 

 

<html>
<p>
<?php
// Create an array and push 5 elements on to it, then
// print the number of elements in your array to the screen
$fav_food=array();
array_push($fav_food,"Sushi");
array_push($fav_food,"Curry");
array_push($fav_food,"Rice");
array_push($fav_food,"Gyoza");
array_push($fav_food,"Ramen");
print count($fav_food);
?>
</p>
</html>

Data and Statistical Programming downloads

Programming

--Python 3.5

https://www.python.org/downloads/

 

--PHP & MySQL  (from WampServer)

http://www.wampserver.com/en/

 

Statistical Analysis Program

--R

https://cran.cnr.berkeley.edu/

--GPower

http://www.gpower.hhu.de/en.html

--Optimal Design

https://sites.google.com/site/optimaldesignsoftware/home

 

Editing Programs

-- NotePad++

https://notepad-plus-plus.org/download/v7.1.html

--Sigil

https://github.com/Sigil-Ebook/Sigil/releases/tag/0.9.6 (There is a link to the exe file at the bottom of the page.

 

 

 

 

How to implement an algorithm using R

This is an example for calculating Body Mass Index using height and weight.

The first line sets the working directory in which the CSV file is located.

setwd("C:/Users/123/Documents/R")

temp <- read.csv(file="practice_data.csv",header=TRUE,sep=",")

bmi=temp$weight/temp$height

bmi

 

This is the CSV file, practice_data.csv.

Name,height,weight
John,1.6,50
Mary,1.7,55
Ed,1.5,44
David,1.3,65