* using log directory 'd:/Rcompile/CRANpkg/local/2.9/FAiR.Rcheck'
* using R version 2.9.2 Patched (2009-09-02 r49531)
* using session charset: ISO8859-1
* checking for file 'FAiR/DESCRIPTION' ... OK
* checking extension type ... Package
* this is package 'FAiR' version '0.4-5'
* package encoding: UTF-8
* checking package name space information ... OK
* checking package dependencies ... OK
* checking if this is a source package ... OK
* checking whether package 'FAiR' can be installed ... OK
* checking package directory ... OK
* checking for portable file names ... OK
* checking DESCRIPTION meta-information ... OK
* checking top-level files ... OK
* checking index information ... OK
* checking package subdirectories ... OK
* checking R files for non-ASCII characters ... OK
* checking R files for syntax errors ... OK
* checking whether the package can be loaded ... OK
* checking whether the package can be loaded with stated dependencies ... OK
* checking whether the name space can be loaded with stated dependencies ... OK
* checking for unstated dependencies in R code ... OK
* checking S3 generic/method consistency ... OK
* checking replacement functions ... OK
* checking foreign function calls ... OK
* checking R code for possible problems ... NOTE
Error in library.dynam(lib, package, package.lib) : 
  shared library 'BioC_graph' not found
FAiR_DAG: no visible global function definition for 'nodes'
FAiR_DAG: no visible global function definition for 'addEdge'
FAiR_DAG: no visible global function definition for 'subGraph'
* checking Rd files ... OK
* checking Rd files against version 2 parser ... OK
* checking Rd cross-references ... OK
* checking for missing documentation entries ... OK
* checking for code/documentation mismatches ... OK
* checking Rd \usage sections ... OK
* checking line endings in C/C++/Fortran sources/headers ... OK
* checking line endings in Makefiles ... OK
* checking for portable use of $BLAS_LIBS ... OK
* checking examples ... ERROR
Running examples in 'FAiR-Ex.R' failed.
The error most likely occurred in:

> ### * 03Factanal
> 
> flush(stderr()); flush(stdout())
> 
> ### Name: Factanal
> ### Title: Estimate Factor Analysis Models
> ### Aliases: Factanal
> ### Keywords: multivariate models
> 
> ### ** Examples
> 
> ## Example from Venables and Ripley (2002, p. 323)
> ## Previously from Bartholomew and Knott  (1999, p. 68--72)
> ## Originally from Smith and Stanley (1983)
> ## Replicated from example(ability.cov)
> 
> man <- make_manifest(covmat = ability.cov)
Warning in FAiR_make_manifest_list(covmat, shrink) :
  it is strongly preferable to pass the raw data to make_manifest()
> 
> ## Not run: 
> ##D ## Here is the easy way to set up a SEFA model, which uses pop-up menus
> ##D res <- make_restrictions(manifest = man, factors = 2, model = "SEFA")
> ## End(Not run)
> 
> ## This is the hard way to set up a restrictions object without pop-up menus
> beta <- matrix(NA_real_, nrow = nrow(cormat(man)), ncol = 2)
> rownames(beta) <- rownames(cormat(man))
> free <- is.na(beta)
> beta <- new("parameter.coef.SEFA", x = beta, free = free, num_free = sum(free))
> 
> Phi  <- diag(2)
> free <- lower.tri(Phi)
> Phi  <- new("parameter.cormat", x = Phi, free = free, num_free = sum(free))
> res  <- make_restrictions(manifest = man, beta = beta, Phi = Phi)
> 
> # This is how to make starting values where Phi is the correlation matrix 
> # among factors, beta is the matrix of coefficients, and the scales are
> # the logarithm of the sample standard deviations. It is also the MLE.
> starts <- c( 4.46294498156615e-01, #  Phi_{21}
+              4.67036349420035e-01, # beta_{11}
+              6.42220238211291e-01, # beta_{21}
+              8.88564379236454e-01, # beta_{31}
+              4.77779639176941e-01, # beta_{41}
+             -7.13405536379741e-02, # beta_{51}
+             -9.47782525342137e-08, # beta_{61}
+              4.04993872375487e-01, # beta_{12}
+             -1.04604290549591e-08, # beta_{22}
+             -9.44950629176182e-03, # beta_{32}
+              2.63078925240678e-04, # beta_{42}
+              9.38038168787216e-01, # beta_{52}
+              8.43618801925473e-01, # beta_{62}
+              log(man@sds))         # log manifest standard deviations
> 
> sefa <- Factanal(manifest = man, restrictions = res, 
+                  # NOTE: Do NOT specify any of the following tiny values in a  
+                  # real research situation; it is done here solely for speed
+                  starting.values = starts, pop.size = 2, max.generations = 6,
+                  wait.generations = 1)


Thu Jan 28 14:56:50 2010
Domains:
 -1.000000e+00   <=  X1   <=    1.000000e+00 
 -1.500000e+00   <=  X2   <=    1.500000e+00 
 -1.500000e+00   <=  X3   <=    1.500000e+00 
 -1.500000e+00   <=  X4   <=    1.500000e+00 
 -1.500000e+00   <=  X5   <=    1.500000e+00 
 -1.500000e+00   <=  X6   <=    1.500000e+00 
 -1.500000e+00   <=  X7   <=    1.500000e+00 
 -1.500000e+00   <=  X8   <=    1.500000e+00 
 -1.500000e+00   <=  X9   <=    1.500000e+00 
 -1.500000e+00   <=  X10  <=    1.500000e+00 
 -1.500000e+00   <=  X11  <=    1.500000e+00 
 -1.500000e+00   <=  X12  <=    1.500000e+00 
 -1.500000e+00   <=  X13  <=    1.500000e+00 
 -1.800000e+01   <=  X14  <=    2.295353e+00 
 -1.800000e+01   <=  X15  <=    1.644201e+00 
 -1.800000e+01   <=  X16  <=    3.197901e+00 
 -1.800000e+01   <=  X17  <=    1.964381e+00 
 -1.800000e+01   <=  X18  <=    2.674543e+00 
 -1.800000e+01   <=  X19  <=    3.146865e+00 

Data Type: Floating Point
Operators (code number, name, population) 
	(1) Cloning........................... 	1
	(2) Uniform Mutation.................. 	0
	(3) Boundary Mutation................. 	0
	(4) Non-Uniform Mutation.............. 	0
	(5) Polytope Crossover................ 	0
	(6) Simple Crossover.................. 	0
	(7) Whole Non-Uniform Mutation........ 	0
	(8) Heuristic Crossover............... 	0
	(9) Local-Minimum Crossover........... 	0

HARD Maximum Number of Generations: 6
Maximum Nonchanging Generations: 1
Population size       : 2
Convergence Tolerance: 1.000000e-03

Using the BFGS Derivative Based Optimizer on the Best Individual Each Generation.
Checking Gradients before Stopping.
Not Using Out of Bounds Individuals But Allowing Trespassing.

Minimization Problem.


Generation#	    Solution Values (lexical)

      0 	-1.000000e+00  -1.000000e+00  -1.000000e+00  -1.000000e+00  6.356664e-02  

'wait.generations' limit reached.
No significant improvement in 1 generations.

Solution Lexical Fitness Value:
-1.000000e+00  -1.000000e+00  -1.000000e+00  -1.000000e+00  6.356664e-02  

Parameters at the Solution (parameter, gradient):

 X[ 1] :	4.462945e-01	G[ 1] :	-1.506061e-05
 X[ 2] :	4.670363e-01	G[ 2] :	-2.910233e-05
 X[ 3] :	6.422202e-01	G[ 3] :	-2.225256e-05
 X[ 4] :	8.885644e-01	G[ 4] :	-5.605264e-05
 X[ 5] :	4.777796e-01	G[ 5] :	-6.675071e-06
 X[ 6] :	-7.134055e-02	G[ 6] :	-0.000000e+00
 X[ 7] :	-9.477825e-08	G[ 7] :	-0.000000e+00
 X[ 8] :	4.049939e-01	G[ 8] :	-1.463011e-05
 X[ 9] :	-1.046043e-08	G[ 9] :	-0.000000e+00
 X[10] :	-9.449506e-03	G[10] :	-2.643417e-05
 X[11] :	2.630789e-04	G[11] :	0.000000e+00
 X[12] :	9.380382e-01	G[12] :	4.832929e-06
 X[13] :	8.436188e-01	G[13] :	-7.343759e-06
 X[14] :	1.602206e+00	G[14] :	1.174018e-05
 X[15] :	9.510538e-01	G[15] :	9.504571e-06
 X[16] :	2.504754e+00	G[16] :	2.032664e-05
 X[17] :	1.271234e+00	G[17] :	3.728702e-06
 X[18] :	1.981396e+00	G[18] :	1.588892e-06
 X[19] :	2.453718e+00	G[19] :	1.738531e-06

Solution Found Generation 1
Number of Generations Run 2

Thu Jan 28 14:56:50 2010
Total run time : 0 hours 0 minutes and 0 seconds
Nelder-Mead resulted in no improvement;  convergence presumably achieved
> nsim <- 101 # number of simulations, also too small for real work
> show(sefa)

Call:
Factanal(manifest = man, restrictions = res, starting.values = starts, 
    pop.size = 2, max.generations = 6, wait.generations = 1)

Number of observations:  112 

Discrepancy:  7.055898 

Semi-exploratory factor analysis with  2 factors
All free factor intercorrelations are on the [-1,1] interval

All coefficients on the [ -1.5 , 1.5 ] interval

Zeros per factor
      A B
zeros 2 2
Mapping rule: default

Discrepancy function:  MLE 

 6 degrees of freedom

> summary(sefa, nsim = nsim)
[1] "100 simulations remaining"
[1] "0 simulations remaining"

Call:
Factanal(manifest = man, restrictions = res, starting.values = starts, 
    pop.size = 2, max.generations = 6, wait.generations = 1)

Point estimates (blanks, if any, are exact zeros):
        F1     F2            Uniqueness
general  0.467  0.405         0.449    
picture  0.642                0.588    
blocks   0.889 -0.009         0.218    
maze     0.478                0.772    
reading         0.938         0.120    
vocab           0.844         0.288    
                                       
F1       1.000  0.446                  
F2       0.446  1.000                  

Upper confidence bounds (blanks, if any, are restricted)
        F1    F2          Uniqueness
general 0.594 0.582       0.581     
picture 0.789             0.731     
blocks  1.080 0.275       0.473     
maze    0.644             0.902     
reading       0.991       0.270     
vocab         0.924       0.427     
                                    
F1      1.000 0.679                 
F2      0.679 1.000                 

Lower confidence bounds (blanks, if any, are restricted)
        F1     F2            Uniqueness
general  0.301  0.249         0.325    
picture  0.519                0.378    
blocks   0.662 -0.241         0.034    
maze     0.313                0.586    
reading         0.855         0.018    
vocab           0.757         0.147    
                                       
F1       1.000  0.239                  
F2       0.239  1.000                  
> model_comparison(sefa, nsim = nsim)
$restrictions

Semi-exploratory factor analysis with  2 factors
All free factor intercorrelations are on the [-1,1] interval

All coefficients on the [ -1.5 , 1.5 ] interval

Zeros per factor
      A B
zeros 2 2
Mapping rule: default

Discrepancy function:  MLE 

 6 degrees of freedom

$exact_fit
$exact_fit$T_ML

	Test of Exact Fit

data:  
T ( Swain correction ) = 6.867, df = 6, p-value = 0.3333
alternative hypothesis: true discrepancy is greater than 0 



$infocriteria
$infocriteria$BIC
[1] 2858.139

$infocriteria$BIC_saturated
[1] 2879.394

$infocriteria$BIC_null
[1] 3126.466

$infocriteria$SIC
[1] 1435.428

$infocriteria$SIC_saturated
[1] 1508.444

$infocriteria$SIC_null
[1] 1569.592


$close_fit
$close_fit$RMSEA

	Test of Close Fit

data:  
T ( Swain correction ) = 6.867, df = 6, p-value = 0.5018
alternative hypothesis: true discrepancy is greater than 0.05 
90 percent confidence interval:
 0.0003751339 0.1323741179 
sample estimates:
     RMSEA 
0.03607973 


$close_fit$gamma

	Gamma Fit Index (Steiger)

data:  

90 percent confidence interval:
 0.9661408 0.9999997 
sample estimates:
  Gamma_1 
0.9974033 



$fit_indices
$fit_indices$GFI
[1] 0.9801767

$fit_indices$AGFI
[1] 0.9306186

$fit_indices$McDonald

	Centrality Index (McDonald)

data:  

sample estimates:
    Index 
0.9961371 


$fit_indices$SRMR
[1] 0.03658248

$fit_indices$TLI
T ( Swain correction ) 
             0.9914335 

$fit_indices$CFI
[1] 0.9965734

$fit_indices$NFI
T ( Swain correction ) 
             0.9743779 

$fit_indices$NNFI
T ( Swain correction ) 
             0.9914335 


> 
> stuff <- list() # output list for various methods
> stuff$model.matrix <- model.matrix(sefa) # sample correlation matrix
> stuff$fitted <- fitted(sefa, reduced = TRUE) # reduced covariance matrix
> stuff$residuals <- residuals(sefa) # difference between model.matrix and fitted
> stuff$rstandard <- rstandard(sefa) # normalized residual matrix
> stuff$weights <- weights(sefa) # (scaled) approximate weights for residuals
> stuff$influence <- influence(sefa) # weights * residuals
> stuff$cormat <- cormat(sefa,  matrix = "RF") # reference factor correlations
> stuff$uniquenesses <- uniquenesses(sefa, standardized = FALSE) # uniquenesses
> stuff$FC <- loadings(sefa, matrix = "FC") # factor contribution matrix
> stuff$draws <- FA2draws(sefa, nsim = nsim) # draws from sampling distribution
[1] "100 simulations remaining"
[1] "0 simulations remaining"
> 
> if(require(nFactors)) screeplot(sefa)  # Enhanced scree plot
Loading required package: nFactors
Loading required package: MASS
Loading required package: psych
Loading required package: boot

Attaching package: 'boot'


	The following object(s) are masked from package:lattice :

	 melanoma 


	The following object(s) are masked from package:robustbase :

	 salinity 


Attaching package: 'nFactors'


	The following object(s) are masked from package:lattice :

	 parallel 

> profile(sefa) # profile plots of non-free parameters
Factors may arbitrarily be plotted in a different order than they  appear in summary()
> pairs(sefa) # Thurstone-style plot
> if(require(Rgraphviz)) plot(sefa) # DAG
Loading required package: Rgraphviz
Loading required package: graph
Error in library.dynam(lib, package, package.lib) : 
  shared library 'BioC_graph' not found
Error: package 'graph' could not be loaded
Execution halted

