Free Statistics

of Irreproducible Research!

Author's title

Author*The author of this computation has been verified*
R Software Modulerwasp_rnglnorm.wasp
Title produced by softwareRandom Number Generator - Log-Normal Distribution
Date of computationWed, 23 Oct 2013 12:38:51 -0400
Cite this page as followsStatistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?v=date/2013/Oct/23/t1382546348f7i40ed6dlsv9l2.htm/, Retrieved Sat, 27 Apr 2024 15:13:54 +0000
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL https://freestatistics.org/blog/index.php?pk=219082, Retrieved Sat, 27 Apr 2024 15:13:54 +0000
QR Codes:

Original text written by user:
IsPrivate?No (this computation is public)
User-defined keywords
Estimated Impact90
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
-     [Notched Boxplots] [WS3.4 - I] [2013-10-23 15:55:35] [31634b7e94db88df109226f71dc63e83]
- RM D  [Random Number Generator - Log-Normal Distribution] [WS3.7a] [2013-10-23 16:35:05] [31634b7e94db88df109226f71dc63e83]
- R       [Random Number Generator - Log-Normal Distribution] [WS3.7b] [2013-10-23 16:36:30] [31634b7e94db88df109226f71dc63e83]
-           [Random Number Generator - Log-Normal Distribution] [WS3.7c] [2013-10-23 16:38:07] [31634b7e94db88df109226f71dc63e83]
-               [Random Number Generator - Log-Normal Distribution] [WS3.7d] [2013-10-23 16:38:51] [38144ba7d4215ff1336c69b1a02252e0] [Current]
-                 [Random Number Generator - Log-Normal Distribution] [WS3.7d] [2013-10-23 16:39:40] [31634b7e94db88df109226f71dc63e83]
-  M              [Random Number Generator - Log-Normal Distribution] [WS3.7f] [2013-10-23 16:44:00] [31634b7e94db88df109226f71dc63e83]
Feedback Forum

Post a new message




Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Maurice George Kendall' @ kendall.wessa.net

\begin{tabular}{lllllllll}
\hline
Summary of computational transaction \tabularnewline
Raw Input & view raw input (R code)  \tabularnewline
Raw Output & view raw output of R engine  \tabularnewline
Computing time & 3 seconds \tabularnewline
R Server & 'Sir Maurice George Kendall' @ kendall.wessa.net \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=219082&T=0

[TABLE]
[ROW][C]Summary of computational transaction[/C][/ROW]
[ROW][C]Raw Input[/C][C]view raw input (R code) [/C][/ROW]
[ROW][C]Raw Output[/C][C]view raw output of R engine [/C][/ROW]
[ROW][C]Computing time[/C][C]3 seconds[/C][/ROW]
[ROW][C]R Server[/C][C]'Sir Maurice George Kendall' @ kendall.wessa.net[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=219082&T=0

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=219082&T=0

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time3 seconds
R Server'Sir Maurice George Kendall' @ kendall.wessa.net







ParameterX1X2X3X4X5X6X7X8X9X10
(SD)(SD)(SD)(SD)(SD)(SD)(SD)(SD)(SD)(SD)
# simulated values100100100100100100100100100100
true mean0000000000
true standard deviation1111111111
mean0.05-0.040.120.1-0.07-0.10.010.01-0.05-0.11
0.090.090.090.10.10.10.090.090.110.09
standard deviation0.940.930.9511.050.990.940.921.120.9
0.070.070.070.070.070.070.070.070.080.06

\begin{tabular}{lllllllll}
\hline
Parameter & X1 & X2 & X3 & X4 & X5 & X6 & X7 & X8 & X9 & X10 \tabularnewline
  & (SD) & (SD) & (SD) & (SD) & (SD) & (SD) & (SD) & (SD) & (SD) & (SD) \tabularnewline
# simulated values & 100 & 100 & 100 & 100 & 100 & 100 & 100 & 100 & 100 & 100 \tabularnewline
true mean & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 \tabularnewline
true standard deviation & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \tabularnewline
mean & 0.05 & -0.04 & 0.12 & 0.1 & -0.07 & -0.1 & 0.01 & 0.01 & -0.05 & -0.11 \tabularnewline
  & 0.09 & 0.09 & 0.09 & 0.1 & 0.1 & 0.1 & 0.09 & 0.09 & 0.11 & 0.09 \tabularnewline
standard deviation & 0.94 & 0.93 & 0.95 & 1 & 1.05 & 0.99 & 0.94 & 0.92 & 1.12 & 0.9 \tabularnewline
  & 0.07 & 0.07 & 0.07 & 0.07 & 0.07 & 0.07 & 0.07 & 0.07 & 0.08 & 0.06 \tabularnewline
\hline
\end{tabular}
%Source: https://freestatistics.org/blog/index.php?pk=219082&T=1

[TABLE]
[ROW][C]Parameter[/C][C]X1[/C][C]X2[/C][C]X3[/C][C]X4[/C][C]X5[/C][C]X6[/C][C]X7[/C][C]X8[/C][C]X9[/C][C]X10[/C][/ROW]
[ROW][C] [/C][C](SD)[/C][C](SD)[/C][C](SD)[/C][C](SD)[/C][C](SD)[/C][C](SD)[/C][C](SD)[/C][C](SD)[/C][C](SD)[/C][C](SD)[/C][/ROW]
[ROW][C]# simulated values[/C][C]100[/C][C]100[/C][C]100[/C][C]100[/C][C]100[/C][C]100[/C][C]100[/C][C]100[/C][C]100[/C][C]100[/C][/ROW]
[ROW][C]true mean[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][C]0[/C][/ROW]
[ROW][C]true standard deviation[/C][C]1[/C][C]1[/C][C]1[/C][C]1[/C][C]1[/C][C]1[/C][C]1[/C][C]1[/C][C]1[/C][C]1[/C][/ROW]
[ROW][C]mean[/C][C]0.05[/C][C]-0.04[/C][C]0.12[/C][C]0.1[/C][C]-0.07[/C][C]-0.1[/C][C]0.01[/C][C]0.01[/C][C]-0.05[/C][C]-0.11[/C][/ROW]
[ROW][C] [/C][C]0.09[/C][C]0.09[/C][C]0.09[/C][C]0.1[/C][C]0.1[/C][C]0.1[/C][C]0.09[/C][C]0.09[/C][C]0.11[/C][C]0.09[/C][/ROW]
[ROW][C]standard deviation[/C][C]0.94[/C][C]0.93[/C][C]0.95[/C][C]1[/C][C]1.05[/C][C]0.99[/C][C]0.94[/C][C]0.92[/C][C]1.12[/C][C]0.9[/C][/ROW]
[ROW][C] [/C][C]0.07[/C][C]0.07[/C][C]0.07[/C][C]0.07[/C][C]0.07[/C][C]0.07[/C][C]0.07[/C][C]0.07[/C][C]0.08[/C][C]0.06[/C][/ROW]
[/TABLE]
Source: https://freestatistics.org/blog/index.php?pk=219082&T=1

Globally Unique Identifier (entire table): ba.freestatistics.org/blog/index.php?pk=219082&T=1

As an alternative you can also use a QR Code:  

The GUIDs for individual cells are displayed in the table below:

ParameterX1X2X3X4X5X6X7X8X9X10
(SD)(SD)(SD)(SD)(SD)(SD)(SD)(SD)(SD)(SD)
# simulated values100100100100100100100100100100
true mean0000000000
true standard deviation1111111111
mean0.05-0.040.120.1-0.07-0.10.010.01-0.05-0.11
0.090.090.090.10.10.10.090.090.110.09
standard deviation0.940.930.9511.050.990.940.921.120.9
0.070.070.070.070.070.070.070.070.080.06



Parameters (Session):
par1 = grey ;
Parameters (R input):
par1 = 100 ; par2 = 0 ; par3 = 1 ; par4 = 8 ; par5 = N ; par6 = 0 ; par7 = 1000 ;
R code (references can be found in the software module):
library(MASS)
par1 <- as.numeric(par1)
par2 <- as.numeric(par2)
par2 <- round(par2,2) #rounded (we want to be able to display 10 columns)
par3 <- as.numeric(par3)
par3 <- round(par3,2) #rounded (we want to be able to display 10 columns)
par4 <- as.numeric(par4)
if (par6 == '0') par6 = 'Sturges' else par6 <- as.numeric(par6)
par7 <- as.numeric(par7)
x <- array(NA,dim=c(par7,par1))
rest.mean <- array(NA,dim=c(par7))
rest.sd <- array(NA,dim=c(par7))
rsd.mean <- array(NA,dim=c(par7))
rsd.sd <- array(NA,dim=c(par7))
for (i in 1:par7)
{
x[i,] <- rlnorm(par1,par2,par3)
x[i,] <- as.ts(x[i,]) #otherwise the fitdistr function does not work properly
dum <- fitdistr(x[i,],'log-normal')
rest.mean[i] <- dum$estimate[1]
rest.sd[i] <- dum$estimate[2]
rsd.mean[i] <- dum$sd[1]
rsd.sd[i] <- dum$sd[2]
}
nc <- par7
if (nc > 10) nc = 10
if (par5 == 'Y')
{
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Index',1,TRUE)
for (j in 1:nc)
{
a<-table.element(a,paste('X',j),1,TRUE)
}
a<-table.row.end(a)
if (nc < par7)
{
a<-table.row.start(a)
a<-table.element(a,'Note: only the first 10 series are displayed',nc+1,TRUE)
a<-table.row.end(a)
}
for (i in 1:par1)
{
a<-table.row.start(a)
a<-table.element(a,i,header=TRUE)
for (j in 1:nc)
{
a<-table.element(a,round(x[j,i],2))
}
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable1.tab')
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Parameter',1,TRUE)
for (j in 1:nc)
{
a<-table.element(a,paste('X',j,sep=''),1,TRUE)
}
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,' ',1,TRUE)
for (j in 1:nc)
{
a<-table.element(a,'(SD)',1,TRUE)
}
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'# simulated values',header=TRUE)
for (j in 1:nc)
{
a<-table.element(a,par1)
}
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'true mean',header=TRUE)
for (j in 1:nc)
{
a<-table.element(a,par2)
}
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'true standard deviation',header=TRUE)
for (j in 1:nc)
{
a<-table.element(a,par3)
}
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'mean',header=TRUE)
for (j in 1:nc)
{
a<-table.element(a,round(rest.mean[j],2))
}
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,' ',header=TRUE)
for (j in 1:nc)
{
a<-table.element(a,round(rsd.mean[j],2))
}
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'standard deviation',header=TRUE)
for (j in 1:nc)
{
a<-table.element(a,round(rest.sd[j],2))
}
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,' ',header=TRUE)
for (j in 1:nc)
{
a<-table.element(a,round(rsd.sd[j],2))
}
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable.tab')
bitmap(file='test0.png')
myhist<-hist(x[1,],col=par4,breaks=par6,main='Histogram of 1st simulated series',ylab='density',xlab='simulated values',freq=F)
dev.off()
bitmap(file='test1.png')
myhist<-hist(rest.mean[],col=par4,breaks=par6,main='Histogram of Estimated Means',ylab='density',xlab='estimated means',freq=F)
x <- rest.mean[]
dummean <- mean(x)
dumsd <- sd(x)
curve(1/(dumsd*sqrt(2*pi))*exp(-1/2*((x-dummean)/dumsd)^2),min(x),max(x),add=T)
dev.off()
bitmap(file='test2.png')
myhist<-hist(rest.sd[],col=par4,breaks=par6,main='Histogram of Estimated SDs',ylab='density',xlab='estimated standard deviations',freq=F)
x <- rest.sd[]
dummean <- mean(x)
dumsd <- sd(x)
curve(1/(dumsd*sqrt(2*pi))*exp(-1/2*((x-dummean)/dumsd)^2),min(x),max(x),add=T)
dev.off()