polygenic: Estimation of polygenic model

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

This function maximises the likelihood of the data under polygenic model with covariates an reports twice negative maximum likelihood estimates and the inverse of the variance-covariance matrix at the point of ML.

Usage

1
2
3
4
5
6
7
  polygenic(formula, kinship.matrix, data, fixh2,
    starth2 = 0.3, trait.type = "gaussian",
    opt.method = "nlm", scaleh2 = 1, quiet = FALSE,
    steptol = 1e-08, gradtol = 1e-08, optimbou = 8,
    fglschecks = TRUE, maxnfgls = 8, maxdiffgls = 1e-04,
    patchBasedOnFGLS = TRUE, llfun = "polylik_eigen",
    eigenOfRel, ...)

Arguments

formula

Formula describing fixed effects to be used in the analysis, e.g. y ~ a + b means that outcome (y) depends on two covariates, a and b. If no covariates used in the analysis, skip the right-hand side of the equation.

kinship.matrix

Kinship matrix, as provided by e.g. ibs(,weight="freq"), or estimated outside of GenABEL from pedigree data.

data

An (optional) object of gwaa.data-class or a data frame with outcome and covariates

fixh2

Optional value of heritability to be used, instead of maximisation. The uses of this option are two-fold: (a) testing significance of heritability and (b) using a priori known heritability to derive the rest of MLEs and var.-cov. matrix.

starth2

Starting value for h2 estimate

trait.type

"gaussian" or "binomial"

opt.method

"nlm" or "optim". These two use different optimisation functions. We suggest using the default nlm, although optim may give better results in some situations

scaleh2

Only relevant when "nlm" optimisation function is used. "scaleh2" is the heritability scaling parameter, regulating how "big" are parameter changes in h2 with respect to changes in other parameters. As other parameters are estimated from previous regression, these are expected to change little from the initial estimate. The default value of 1000 proved to work rather well under a range of conditions.

quiet

If FALSE (default), details of optimisation process are reported

steptol

steptal parameter of "nlm"

gradtol

gradtol parameter of "nlm"

optimbou

fixed effects boundary scale parameter for 'optim'

fglschecks

additional check for convergence on/off (convergence between estimates obtained and that from FGLS)

maxnfgls

number of fgls checks to perform

maxdiffgls

max difference allowed in fgls checks

patchBasedOnFGLS

if FGLS checks not passed, 'patch' fixed effect estimates based on FGLS expectation

llfun

function to compute likelihood (default 'polylik_eigen', also available – but not recommended – 'polylik')

eigenOfRel

results of eigen(relationship matrix = 2*kinship.matrix). Passing this can decrease computational time substantially if multiple traits are analysed using the same kinship matrix. This option will not work if any NA's are found in the trait and/or covariates and if the dimensions of the 'eigen'-object, trait, covariates, kinship do not match.

...

Optional arguments to be passed to nlm or (optim) minimisation function

Details

One of the major uses of this function is to estimate residuals of the trait and the inverse of the variance-covariance matrix for further use in analysis with mmscore and grammar.

Also, it can be used for a variant of GRAMMAR analysis, which allows for permutations for GW significance by use of environmental residuals as an analysis trait with qtscore.

"Environmental residuals" (not to be mistaken with just "residuals") are the residual where both the effect of covariates AND the estimated polygenic effect (breeding values) are factored out. This thus provides an estimate of the trait value contributed by environment (or, turning this other way around, the part of the trait not explained by covariates and by the polygene). Polygenic residuals are estimated as

σ^2 V^{-1} (Y - (\hat{μ} + \hat{β} C_1 + ...))

where sigma^2 is the residual variance, V^{-1} is the InvSigma (inverse of the var-cov matrix at the maximum of polygenic model) and (Y - (\hat{μ} + \hat{β} C_1 + ...)) is the trait values adjusted for covariates (also at at the maximum of polygenic model likelihood).

It can also be used for heritability analysis. If you want to test significance of heritability, estimate the model and write down the function minimum reported at the "h2an" element of the output (this is twice the negative MaxLikelihood). Then do a next round of estimation, but set fixh2=0. The difference between your function minima gives a test distributed as chi-squared with 1 d.f.

The way to compute the likelihood is partly based on the paper of Thompson (see refs), namely instead of taking the inverse of the var-cov matrix every time, eigenvectors of the inverse of G (taken only once) are used.

Value

A list with values

h2an

A list supplied by the nlm minimisation routine. Of particular interest are elements "estimate" containing parameter maximal likelihood estimates (MLEs) (order: mean, betas for covariates, heritability, (polygenic + residual variance)). The value of twice negative maximum log-likelihood is returned as h2an\$minimum.

esth2

Estimate (or fixed value) of heritability

residualY

Residuals from analysis, based on covariate effects only; NOTE: these are NOT grammar "environmental residuals"!

pgresidualY

Environmental residuals from analysis, based on covariate effects and predicted breeding value.

grresidualY

GRAMMAR+ transformed trait residuals

grammarGamma

list with GRAMMAR-gamma correction factors

InvSigma

Inverse of the variance-covariance matrix, computed at the MLEs – these are used in mmscore and grammar functions.

call

The details of call

measuredIDs

Logical values for IDs who were used in analysis (traits and all covariates measured) == TRUE

convFGLS

was convergence achieved according to FGLS criterionE

Note

Presence of twins may complicate your analysis. Check the kinship matrix for singularities, or rather use check.marker for identification of twin samples. Take special care in interpretation.

If a trait (no covariates) is used, make sure that the order of IDs in the kinship.matrix is exactly the same as in the outcome

Please note that there is alternative to 'polygenic', polygenic_hglm, which is faster than polygenic() with the llfun='polylik' option, but slightly slower than the default polygenic().

Author(s)

Yurii Aulchenko, Gulnara Svischeva

References

Thompson EA, Shaw RG (1990) Pedigree analysis for quantitative traits: variance components without matrix inversion. Biometrics 46, 399-413.

for original GRAMMAR

Aulchenko YS, de Koning DJ, Haley C. Genomewide rapid association using mixed model and regression: a fast and simple method for genome-wide pedigree-based quantitative trait loci association analysis. Genetics. 2007 177(1):577-85.

for GRAMMAR-GC

Amin N, van Duijn CM, Aulchenko YS. A genomic background based method for association analysis in related individuals. PLoS ONE. 2007 Dec 5;2(12):e1274.

for GRAMMAR-Gamma

Svischeva G, Axenovich TI, Belonogova NM, van Duijn CM, Aulchenko YS. Rapid variance components-based method for whole-genome association analysis. Nature Genetics. 2012 44:1166-1170. doi:10.1038/ng.2410

for GRAMMAR+ transformation

Belonogova NM, Svishcheva GR, van Duijn CM, Aulchenko YS, Axenovich TI (2013) Region-Based Association Analysis of Human Quantitative Traits in Related Individuals. PLoS ONE 8(6): e65395. doi:10.1371/journal.pone.0065395

See Also

polygenic_hglm, mmscore, grammar

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
# note that procedure runs on CLEAN data
require(GenABEL.data)
data(ge03d2ex.clean)
gkin <- ibs(ge03d2ex.clean,w="freq")
h2ht <- polygenic(height ~ sex + age, kin=gkin, ge03d2ex.clean)
# estimate of heritability
h2ht$esth2
# other parameters
h2ht$h2an
# the minimum twice negative log-likelihood
h2ht$h2an$minimum
# twice maximum log-likelihood
-h2ht$h2an$minimum

# for binary trait (experimental)
h2dm <- polygenic(dm2 ~ sex + age, kin=gkin, ge03d2ex.clean, trait="binomial")
# estimated parameters
h2dm$h2an

Example output

Loading required package: MASS
Loading required package: GenABEL.data
LM estimates of fixed parameters:
desmat(Intercept)         desmatsex         desmatage 
      -0.03595906        1.35161070       -0.01526032 
iteration = 0
Step:
[1] 0 0 0 0 0
Parameter:
[1] -0.03595906  1.35161070 -0.01526032  0.30000000  0.56541567
Function Value
[1] 44.96445
Gradient:
[1]  0.6952411 -4.9601763 -1.0986500 -7.4497076  7.7513129

iteration = 1
Step:
[1] -5.201715e-05  3.711147e-04  8.219974e-05  5.573786e-04 -5.799444e-04
Parameter:
[1] -0.03601108  1.35198181 -0.01517812  0.30055738  0.56483573
Function Value
[1] 44.95909
Gradient:
[1]   3.107222  -3.511972 121.907800  -7.432526   7.555024

iteration = 2
Step:
[1] -0.0056803906  0.0391389920 -0.0004557513  0.0589434941 -0.0613165833
Parameter:
[1] -0.04169147  1.39112081 -0.01563388  0.35950087  0.50351915
Function Value
[1] 44.63419
Gradient:
[1]   0.1555315  -2.8746362 -43.4451610  -6.8388025 -17.7974660

iteration = 3
Step:
[1]  0.0018629761 -0.0130601242  0.0001444049 -0.0195093144  0.0215087235
Parameter:
[1] -0.03982849  1.37806068 -0.01548947  0.33999156  0.52502787
Function Value
[1] 44.53947
Gradient:
[1]  1.011636 -3.226584  5.550631 -7.085987 -7.490362

iteration = 4
Step:
[1] -2.994997e-04  1.837261e-03 -1.748087e-05  2.931252e-03 -1.889602e-03
Parameter:
[1] -0.04012799  1.37989794 -0.01550695  0.34292281  0.52313827
Function Value
[1] 44.52749
Gradient:
[1]  0.9640696 -3.1335755  2.5363639 -7.0480591 -8.3212282

iteration = 5
Step:
[1] -0.0024710671  0.0141878257 -0.0001288244  0.0234295749 -0.0100040555
Parameter:
[1] -0.04259906  1.39408577 -0.01563578  0.36635239  0.51313421
Function Value
[1] 44.43237
Gradient:
[1]   0.6645141  -2.3289872 -16.7405295  -6.7102443 -12.9213073

iteration = 6
Step:
[1] -0.0034887192  0.0186767407 -0.0001586064  0.0320319929 -0.0066370511
Parameter:
[1] -0.04608778  1.41276251 -0.01579438  0.39838438  0.50649716
Function Value
[1] 44.29205
Gradient:
[1]   0.434841  -1.101415 -32.878705  -6.206905 -16.232392

iteration = 7
Step:
[1] -0.0083824716  0.0424238096 -0.0003400073  0.0750898987 -0.0032228593
Parameter:
[1] -0.05447025  1.45518632 -0.01613439  0.47347428  0.50327430
Function Value
[1] 43.9565
Gradient:
[1]   0.2351745   1.9975845 -51.3453032  -5.0223199 -18.4659207

iteration = 8
Step:
[1] -0.0094453882  0.0445536478 -0.0003308165  0.0821760264  0.0116543804
Parameter:
[1] -0.06391564  1.49973997 -0.01646521  0.55565030  0.51492868
Function Value
[1] 43.58117
Gradient:
[1]   0.5808767   5.5383725 -40.0186002  -3.9310594 -14.0381792

iteration = 9
Step:
[1] -0.0058783413  0.0239988528 -0.0001573366  0.0484418571  0.0221591395
Parameter:
[1] -0.06979398  1.52373882 -0.01662254  0.60409216  0.53708782
Function Value
[1] 43.34279
Gradient:
[1]   1.051246   7.349500 -16.605703  -3.642096  -5.229185

iteration = 10
Step:
[1] -1.158292e-03  1.756650e-03  6.728088e-06  7.518883e-03  1.300087e-02
Parameter:
[1] -0.07095227  1.52549547 -0.01661582  0.61161104  0.55008869
Function Value
[1] 43.29157
Gradient:
[1]  1.2567523  7.3859214 -3.9416819 -3.7778617 -0.2132411

iteration = 11
Step:
[1] -1.177800e-04 -1.724444e-03  2.472415e-05 -4.189617e-04  3.868139e-03
Parameter:
[1] -0.07107005  1.52377103 -0.01659109  0.61119208  0.55395683
Function Value
[1] 43.28242
Gradient:
[1]  1.342678  7.225841  1.754204 -3.838303  1.270675

iteration = 12
Step:
[1] -2.898677e-04 -2.807326e-03  3.975047e-05  1.080056e-05  3.640250e-03
Parameter:
[1] -0.07135992  1.52096370 -0.01655134  0.61120288  0.55759708
Function Value
[1] 43.26933
Gradient:
[1]  1.361838  6.920845  4.765588 -3.870127  2.636419

iteration = 13
Step:
[1] -1.248027e-03 -6.035858e-03  9.903974e-05  3.872902e-03  5.921292e-03
Parameter:
[1] -0.07260794  1.51492784 -0.01645230  0.61507578  0.56351837
Function Value
[1] 43.23549
Gradient:
[1]  1.467064  6.284171 14.956889 -3.829444  4.722074

iteration = 14
Step:
[1] -0.003667111 -0.010338786  0.000193242  0.015963932  0.007831988
Parameter:
[1] -0.07627506  1.50458906 -0.01625906  0.63103972  0.57135036
Function Value
[1] 43.16296
Gradient:
[1]  1.304292  4.918091 16.850343 -3.559436  7.135861

iteration = 15
Step:
[1] -0.0086120418 -0.0148080383  0.0003485246  0.0432997412  0.0080067358
Parameter:
[1] -0.08488710  1.48978102 -0.01591053  0.67433946  0.57935709
Function Value
[1] 43.02931
Gradient:
[1]  1.339562  2.899138 37.143789 -2.798269  8.803389

iteration = 16
Step:
[1] -0.0135627829 -0.0116172745  0.0003872629  0.0752708151  0.0024409612
Parameter:
[1] -0.09844988  1.47816374 -0.01552327  0.74961027  0.58179805
Function Value
[1] 42.86704
Gradient:
[1]  -0.2311334  -0.1894086 -16.1612798  -1.5413494   7.4262848

iteration = 17
Step:
[1] -0.0121374504  0.0030276774  0.0002412749  0.0754016688 -0.0052203932
Parameter:
[1] -0.1105873  1.4811914 -0.0152820  0.8250119  0.5765777
Function Value
[1] 42.76368
Gradient:
[1]   3.0988223   0.9230727 165.8923264  -0.6038011   2.8933417

iteration = 18
Step:
[1] -1.193064e-02  1.500920e-02 -8.709254e-05  8.100285e-02 -4.051641e-03
Parameter:
[1] -0.12251797  1.49620062 -0.01536909  0.90601479  0.57252602
Function Value
[1] 42.7415
Gradient:
[1]   -25.196607   -15.161577 -1208.005117    -1.512464    -2.525064

iteration = 19
Step:
[1] -5.024815e-03  6.766438e-03  8.668581e-06  3.437199e-02 -5.908472e-04
Parameter:
[1] -0.12754279  1.50296706 -0.01536042  0.94038678  0.57193517
Function Value
[1] 42.66949
Gradient:
[1]   -43.816646   -25.735535 -2107.566022    -4.461268    -4.814848

iteration = 20
Step:
[1] -6.727971e-03  8.226600e-03  1.406721e-05  4.552273e-02 -6.173578e-04
Parameter:
[1] -0.13427076  1.51119366 -0.01534635  0.98590951  0.57131781
Function Value
[1] 42.43899
Gradient:
[1] -2.184576e+02 -1.263053e+02 -1.057406e+04  6.603956e-01 -9.174241e+00

iteration = 21
Step:
[1] -1.571452e-04  2.488553e-04  1.107746e-06  1.099544e-03 -5.839027e-05
Parameter:
[1] -0.13442790  1.51144251 -0.01534525  0.98700906  0.57125942
Function Value
[1] 42.43301
Gradient:
[1]   -235.625791   -136.196181 -11406.280852      4.424992     -9.378391

iteration = 22
Step:
[1] -4.598765e-04  2.113960e-03  1.876863e-06  4.034224e-03  2.353895e-04
Parameter:
[1] -0.13488778  1.51355647 -0.01534337  0.99104328  0.57149481
Function Value
[1] 42.23814
Gradient:
[1]   -303.14149   -174.95881 -14673.75621     15.34813     -9.78877

iteration = 23
Step:
[1] -4.762620e-04  2.286486e-03  2.810688e-06  4.252874e-03  7.929576e-05
Parameter:
[1] -0.13536404  1.51584296 -0.01534056  0.99529616  0.57157411
Function Value
[1] 42.04943
Gradient:
[1]   -492.91950   -284.20853 -23858.07348    103.41617    -10.75527

iteration = 24
Step:
[1] -4.880739e-05  8.052088e-04 -1.281772e-06  7.754507e-04  2.914410e-04
Parameter:
[1] -0.13541285  1.51664817 -0.01534184  0.99607161  0.57186555
Function Value
[1] 41.9555
Gradient:
[1]   -553.81021   -319.24373 -26800.66105    141.37753    -10.83452

iteration = 25
Step:
[1] -5.817446e-05  3.629908e-03 -1.135983e-05  2.511617e-03  1.930430e-03
Parameter:
[1] -0.1354710  1.5202781 -0.0153532  0.9985832  0.5737960
Function Value
[1] 41.6486
Gradient:
[1]  -1112.25314   -640.91055 -53759.09134    861.17589    -11.48326

iteration = 26
Step:
[1]  3.152763e-04  5.808994e-03 -4.048516e-05  6.614566e-04  1.947813e-02
Parameter:
[1] -0.13515575  1.52608707 -0.01539368  0.99924468  0.59327411
Function Value
[1] 40.05337
Gradient:
[1]  -1153.825163   -664.287358 -55518.442458    417.864667     -3.036911

iteration = 27
Step:
[1]  7.914019e-05  9.297012e-04 -1.026842e-05  1.121967e-04  1.794036e-04
Parameter:
[1] -0.13507661  1.52701677 -0.01540395  0.99935688  0.59345351
Function Value
[1] 39.96911
Gradient:
[1]  -1285.334290   -740.027916 -61813.664680    605.314683     -3.111495

iteration = 28
Step:
[1]  4.883655e-04  5.054683e-03 -6.185446e-05  3.141007e-04  5.701953e-04
Parameter:
[1] -0.13458824  1.53207145 -0.01546581  0.99967098  0.59402371
Function Value
[1] 39.72506
Gradient:
[1]  -2048.838072  -1179.789650 -98298.564222   2448.057715     -3.654304

iteration = 29
Step:
[1]  1.214517e-04  1.276153e-03 -1.452827e-05  7.376215e-05  6.570941e-04
Parameter:
[1] -0.13446679  1.53334761 -0.01548034  0.99974474  0.59468080
Function Value
[1] 39.61036
Gradient:
[1] -2.411351e+03 -1.388711e+03 -1.155454e+05  3.694601e+03 -3.673803e+00

iteration = 30
Step:
[1]  7.452209e-05  7.672971e-04 -8.911639e-06  2.939784e-05  4.996318e-04
Parameter:
[1] -0.13439227  1.53411490 -0.01548925  0.99977414  0.59518043
Function Value
[1] 39.518
Gradient:
[1] -2.581160e+03 -1.486559e+03 -1.235815e+05  4.304559e+03 -3.560188e+00

iteration = 31
Step:
[1]  2.626547e-04  2.543459e-03 -3.242419e-05  5.485978e-05  8.812888e-04
Parameter:
[1] -0.13412961  1.53665836 -0.01552167  0.99982900  0.59606172
Function Value
[1] 39.37919
Gradient:
[1] -3.063640e+03 -1.764532e+03 -1.464272e+05  6.484346e+03 -3.505848e+00

iteration = 32
Step:
[1] -4.850160e-04 -4.027918e-03  6.994311e-05  1.291776e-04  5.521813e-03
Parameter:
[1] -0.13461463  1.53263044 -0.01545173  0.99995818  0.60158353
Function Value
[1] 38.5911
Gradient:
[1] -7.015695e+03 -4.044164e+03 -3.307688e+05  4.239322e+04 -2.747247e+00

iteration = 33
Step:
[1] -0.0036846213 -0.0331472710  0.0004729021 -0.0001385644  0.0097942344
Parameter:
[1] -0.13829925  1.49948317 -0.01497883  0.99981961  0.61137777
Function Value
[1] 37.71216
Gradient:
[1]  -1176.042376   -679.935038 -54772.439345  -3683.879832      4.168696

iteration = 34
Step:
[1]  3.077973e-04  2.883885e-03 -4.095993e-05  5.731157e-06  1.596461e-05
Parameter:
[1] -0.13799145  1.50236706 -0.01501979  0.99982534  0.61139373
Function Value
[1] 37.71183
Gradient:
[1]  -1261.023533   -728.643945 -58829.900330  -3587.156500      4.120981

iteration = 35
Step:
[1]  2.197557e-04  2.046782e-03 -2.907519e-05  4.230519e-06  3.375284e-05
Parameter:
[1] -0.13777170  1.50441384 -0.01504886  0.99982957  0.61142749
Function Value
[1] 37.71178
Gradient:
[1]  -1323.662715   -764.555241 -61817.199961  -3511.308969      4.090928

iteration = 36
Step:
[1] -2.570604e-04 -2.373342e-03  3.376401e-05 -4.865204e-06 -6.183080e-05
Parameter:
[1] -0.1380288  1.5020405 -0.0150151  0.9998247  0.6113657
Function Value
[1] 37.71152
Gradient:
[1]  -1252.311200   -723.571453 -60880.544794  -3360.513025      4.118845

iteration = 37
Step:
[1] -8.613738e-04  1.035953e-03  6.909211e-06  1.960728e-05 -9.759670e-03
Parameter:
[1] -0.13889013  1.50307645 -0.01500819  0.99984431  0.60160598
Function Value
[1] 37.51618
Gradient:
[1]  -1257.166645   -726.276998 -61115.097604  -4067.154715      1.236159

iteration = 38
Step:
[1] -4.997227e-03  1.508595e-02 -6.728274e-05  1.496902e-04 -5.013312e-02
Parameter:
[1] -0.14388736  1.51816240 -0.01507547  0.99999401  0.55147287
Function Value
[1] 34.53783
Gradient:
[1]   -5980.33896   -3448.23574 -290875.51455   44010.32035     -17.30548

iteration = 39
Parameter:
[1] -0.14388736  1.51816240 -0.01507547  0.99999401  0.55147287
Function Value
[1] 34.53783
Gradient:
[1]   -5980.33896   -3448.23574 -290875.51455   44010.32035     -17.30548

Last global step failed to locate a point lower than x.
Either x is an approximate local minimum of the function,
the function is too non-linear for this algorithm,
or steptol is too large.

difFGLS:
[1] 0.1438866 1.5181628 0.0150402
fixed effect betas changed to FGLS-betas for re-estimation
iteration = 0
Step:
[1] 0 0 0 0 0
Parameter:
[1] -7.250237e-07 -4.180867e-07 -3.526983e-05  9.999940e-01  5.514729e-01
Function Value
[1] 172.985
Gradient:
[1]      21.39558    -172.36984   81479.68470 -182035.74323    -268.35463

iteration = 1
Step:
[1] -2.703002e-10  2.177627e-09 -1.029370e-06  2.299741e-06  3.390247e-09
Parameter:
[1] -7.252940e-07 -4.159090e-07 -3.629920e-05  9.999963e-01  5.514729e-01
Function Value
[1] 172.6428
Gradient:
[1]   -5554.4953   -3392.9377 -140236.1148 -262282.5545    -268.6098

iteration = 2
Step:
[1]  7.941777e-10  9.124004e-10 -1.664463e-07  4.592674e-07  6.591203e-10
Parameter:
[1] -7.244998e-07 -4.149966e-07 -3.646565e-05  9.999968e-01  5.514729e-01
Function Value
[1] 172.5864
Gradient:
[1]   -7371.9159   -4442.8849 -210347.7719 -271499.3653    -268.7475

iteration = 3
Step:
[1]  1.293685e-08  8.558506e-09 -7.623648e-08  2.860451e-07  1.563140e-09
Parameter:
[1] -7.115630e-07 -4.064381e-07 -3.654189e-05  9.999971e-01  5.514729e-01
Function Value
[1] 172.5462
Gradient:
[1]   -8600.0836   -5152.6135 -255826.4738 -274825.1718    -268.8418

iteration = 4
Step:
[1]  4.468662e-08  2.874172e-08 -8.846557e-08  4.464591e-07  4.174900e-09
Parameter:
[1] -6.668764e-07 -3.776964e-07 -3.663035e-05  9.999975e-01  5.514729e-01
Function Value
[1] 172.4752
Gradient:
[1]  -10825.8889   -6439.1582 -335345.8142 -268133.3274    -269.0097

iteration = 5
Step:
[1]  2.565799e-07  1.634779e-07 -1.633817e-07  1.280177e-06  2.165055e-08
Parameter:
[1] -4.102964e-07 -2.142185e-07 -3.679373e-05  9.999988e-01  5.514729e-01
Function Value
[1] 172.3173
Gradient:
[1]  -24612.3641  -14410.0061 -808097.4807 2260957.4104    -270.0145

iteration = 6
Step:
[1]  4.686870e-08  3.427485e-08  1.245002e-07 -5.587739e-07  1.067738e-08
Parameter:
[1] -3.634277e-07 -1.799436e-07 -3.666923e-05  9.999982e-01  5.514729e-01
Function Value
[1] 172.3054
Gradient:
[1]  -15524.6733   -9156.8070 -487173.3472 -147023.0020    -269.3152

iteration = 7
Step:
[1] 4.349374e-07 2.815183e-07 1.441202e-07 2.995798e-08 4.341239e-08
Parameter:
[1]  7.150968e-08  1.015747e-07 -3.652511e-05  9.999982e-01  5.514730e-01
Function Value
[1] 172.1833
Gradient:
[1]  -14003.2608   -8279.9597 -408615.7019 -280481.7433    -269.1244

iteration = 8
Step:
[1] 8.227897e-06 5.266223e-06 2.162161e-06 8.336993e-07 7.306458e-07
Parameter:
[1]  8.299407e-06  5.367798e-06 -3.436295e-05  9.999991e-01  5.514737e-01
Function Value
[1] 171.8232
Gradient:
[1]   25284.9856   14349.9774 1746837.4447 2161826.8315    -269.6327

iteration = 9
Step:
[1] -2.830714e-06 -1.826299e-06 -8.838457e-07 -3.471264e-07 -2.734530e-07
Parameter:
[1]  5.468693e-06  3.541499e-06 -3.524680e-05  9.999987e-01  5.514734e-01
Function Value
[1] 171.4498
Gradient:
[1]     3206.5172     1633.1726   532322.6384 -1480528.7173     -268.3798

iteration = 10
Step:
[1]  4.808095e-07  2.550995e-07 -3.446460e-07  1.197499e-07 -3.738298e-08
Parameter:
[1]  5.949502e-06  3.796599e-06 -3.559144e-05  9.999989e-01  5.514734e-01
Function Value
[1] 171.3448
Gradient:
[1]    -2235.0938    -1508.8450   306534.6177 -1951739.0936     -268.3683

iteration = 11
Step:
[1]  7.382568e-07  4.096077e-07 -3.576726e-07  1.507269e-07 -3.014743e-08
Parameter:
[1]  6.687759e-06  4.206206e-06 -3.594912e-05  9.999990e-01  5.514733e-01
Function Value
[1] 171.3071
Gradient:
[1]   -9328.2472   -5605.6778   23660.7024 2677876.0962    -268.5534

iteration = 12
Step:
[1] -2.183609e-07 -8.367507e-08  1.742902e-07 -2.322627e-08  6.603415e-08
Parameter:
[1]  6.469398e-06  4.122531e-06 -3.577483e-05  9.999990e-01  5.514734e-01
Function Value
[1] 171.2646
Gradient:
[1]   -6016.2472   -3645.5854 -292032.4657   -9052.6643    -268.4355

iteration = 13
Step:
[1] -3.665899e-07 -1.138747e-07  2.957366e-07 -3.924904e-08  1.513485e-07
Parameter:
[1]  6.102808e-06  4.008656e-06 -3.547909e-05  9.999989e-01  5.514736e-01
Function Value
[1] 171.2574
Gradient:
[1]   -389.8093   -401.0869 -18326.3318  -9053.2454   -268.3544

iteration = 14
Parameter:
[1]  6.102808e-06  4.008656e-06 -3.547909e-05  9.999989e-01  5.514736e-01
Function Value
[1] 171.2574
Gradient:
[1]   -389.8093   -401.0869 -18326.3318  -9053.2454   -268.3544

Last global step failed to locate a point lower than x.
Either x is an approximate local minimum of the function,
the function is too non-linear for this algorithm,
or steptol is too large.

difFGLS:
[1] 6.827759e-06 4.426701e-06 2.128240e-07

******************************************
*** GOOD convergence indicated by FGLS ***
******************************************
Warning message:
In polygenic(height ~ sex + age, kin = gkin, ge03d2ex.clean) :
  some eigenvalues close/less than 1e-8, setting them to 1e-8
you can also try option llfun='polylik' instead
[1] 0.9999989
$minimum
[1] 698.2069

$estimate
[1]  1.702026e+02  3.962819e-05 -3.507340e-04  9.999989e-01  5.389340e+01

$gradient
[1]   -389.8093   -401.0869 -18326.3318  -9053.2454   -268.3544

$code
[1] 3

$iterations
[1] 14

[1] 698.2069
[1] -698.2069
LM estimates of fixed parameters:
desmat(Intercept)         desmatsex         desmatage 
      -0.68387860        0.56774460        0.01787041 
iteration = 0
Step:
[1] 0 0 0 0 0
Parameter:
[1] -0.68387860  0.56774460  0.01787041  0.30000000  4.51763042
Function Value
[1] 180.6698
Gradient:
[1]  0.0009084147 -0.0356880037 -0.4256702937 -4.4684565523 24.3849166591

iteration = 1
Step:
[1] -8.242247e-05  3.238051e-03  3.862201e-02  4.054329e-01 -2.212497e+00
Parameter:
[1] -0.68396103  0.57098265  0.05649242  0.70543294  2.30513301
Function Value
[1] 117.1616
Gradient:
[1]   8.519400   3.326277 347.254448  28.042685  39.447832

iteration = 2
Step:
[1] -0.14369299 -0.05610285 -5.85698852 -0.47298367 -0.66534928
Parameter:
[1] -0.8276540  0.5148798 -5.8004961  0.2324493  1.6397837
Function Value
[1] 109.6195
Gradient:
[1]  0.00000  0.00000  0.00000 43.90581 38.98239

iteration = 3
Step:
[1] -2.816365e-05 -1.099609e-05 -1.147963e-03 -2.419883e-02 -2.153337e-02
Parameter:
[1] -0.8276822  0.5148688 -5.8016441  0.2082504  1.6182504
Function Value
[1] 107.7294
Gradient:
[1]  0.00000  0.00000  0.00000 42.26395 39.75974

iteration = 4
Step:
[1] -0.0001760877 -0.0000687509 -0.0071774107 -0.1492786046 -0.3129398878
Parameter:
[1] -0.82785827  0.51480005 -5.80882147  0.05897184  1.30531047
Function Value
[1] 88.34065
Gradient:
[1]  0.00000  0.00000  0.00000 40.18280 45.02935

iteration = 5
Step:
[1] -1.666106e-05 -6.505070e-06 -6.791120e-04 -1.412435e-02 -2.961737e-02
Parameter:
[1] -0.82787493  0.51479354 -5.80950059  0.04484749  1.27569310
Function Value
[1] 86.43301
Gradient:
[1]  0.00000  0.00000  0.00000 40.20546 45.45210

iteration = 6
Step:
[1] -1.661784e-05 -6.488194e-06 -6.773502e-04 -1.408770e-02 -2.954091e-02
Parameter:
[1] -0.82789155  0.51478705 -5.81017794  0.03075978  1.24615219
Function Value
[1] 84.51764
Gradient:
[1]  0.00000  0.00000  0.00000 40.26049 45.84853

iteration = 7
Step:
[1] -1.656779e-05 -6.468656e-06 -6.753105e-04 -1.404528e-02 -2.945226e-02
Parameter:
[1] -0.82790812  0.51478058 -5.81085325  0.01671451  1.21669993
Function Value
[1] 82.59579
Gradient:
[1]  0.00000  0.00000  0.00000 40.34675 46.21406

iteration = 8
Step:
[1] -1.650629e-05 -6.444642e-06 -6.728034e-04 -1.399313e-02 -2.934316e-02
Parameter:
[1] -0.827924622  0.514774140 -5.811526050  0.002721372  1.187356776
Function Value
[1] 80.66945
Gradient:
[1]  0.00000  0.00000  0.00000 40.46308 46.54336

iteration = 9
Step:
[1] -1.642822e-06 -6.414162e-07 -6.696214e-05 -1.392695e-03 -2.920455e-03
Parameter:
[1] -0.827926265  0.514773498 -5.811593012  0.001328677  1.184436321
Function Value
[1] 80.47711
Gradient:
[1]  0.00000  0.00000  0.00000 40.47629 46.57400

iteration = 10
Step:
[1] -1.641932e-07 -6.410685e-08 -6.692584e-06 -1.391940e-04 -2.918873e-04
Parameter:
[1] -0.827926429  0.514773434 -5.811599705  0.001189483  1.184144433
Function Value
[1] 80.45788
Gradient:
[1]  0.00000  0.00000  0.00000 40.47763 46.57704

iteration = 11
Step:
[1] -1.641841e-07 -6.410332e-08 -6.692216e-06 -1.391864e-04 -2.918713e-04
Parameter:
[1] -0.827926593  0.514773370 -5.811606397  0.001050296  1.183852562
Function Value
[1] 80.43865
Gradient:
[1]  0.00000  0.00000  0.00000 40.47897 46.58008

iteration = 12
Step:
[1] -1.641751e-07 -6.409979e-08 -6.691847e-06 -1.391787e-04 -2.918552e-04
Parameter:
[1] -0.8279267572  0.5147733061 -5.8116130889  0.0009111176  1.1835607067
Function Value
[1] 80.41942
Gradient:
[1]  0.00000  0.00000  0.00000 40.48031 46.58311

iteration = 13
Step:
[1] -1.641660e-07 -6.409625e-08 -6.691477e-06 -1.391710e-04 -2.918391e-04
Parameter:
[1] -0.8279269213  0.5147732420 -5.8116197803  0.0007719466  1.1832688675
Function Value
[1] 80.4002
Gradient:
[1]  0.00000  0.00000  0.00000 40.48166 46.58613

iteration = 14
Step:
[1] -1.641569e-07 -6.409269e-08 -6.691107e-06 -1.391633e-04 -2.918230e-04
Parameter:
[1] -0.8279270855  0.5147731779 -5.8116264714  0.0006327833  1.1829770446
Function Value
[1] 80.38097
Gradient:
[1]  0.00000  0.00000  0.00000 40.48300 46.58916

iteration = 15
Step:
[1] -1.641478e-07 -6.408913e-08 -6.690735e-06 -1.391556e-04 -2.918068e-04
Parameter:
[1] -0.8279272496  0.5147731138 -5.8116331622  0.0004936278  1.1826852378
Function Value
[1] 80.36174
Gradient:
[1]  0.00000  0.00000  0.00000 40.48436 46.59218

iteration = 16
Step:
[1] -1.641387e-07 -6.408557e-08 -6.690362e-06 -1.391478e-04 -2.917905e-04
Parameter:
[1] -0.82792741  0.51477305 -5.81163985  0.00035448  1.18239345
Function Value
[1] 80.34251
Gradient:
[1]  0.00000  0.00000  0.00000 40.48571 46.59519

iteration = 17
Step:
[1] -1.641295e-07 -6.408199e-08 -6.689989e-06 -1.391400e-04 -2.917743e-04
Parameter:
[1] -0.8279275779  0.5147729856 -5.8116465425  0.0002153399  1.1821016730
Function Value
[1] 80.32328
Gradient:
[1]  0.00000  0.00000  0.00000 40.48707 46.59820

iteration = 18
Step:
[1] -1.641203e-07 -6.407840e-08 -6.689615e-06 -1.391323e-04 -2.917579e-04
Parameter:
[1] -8.279277e-01  5.147729e-01 -5.811653e+00  7.620769e-05  1.181810e+00
Function Value
[1] 80.30405
Gradient:
[1]  0.00000  0.00000  0.00000 40.48842 46.60120

iteration = 19
Step:
[1] -1.641111e-08 -6.407481e-09 -6.689239e-07 -1.391244e-05 -2.917416e-05
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811654e+00  6.229525e-05  1.181781e+00
Function Value
[1] 80.30213
Gradient:
[1]  0.00000  0.00000  0.00000 40.48856 46.60150

iteration = 20
Step:
[1] -1.641102e-08 -6.407445e-09 -6.689202e-07 -1.391237e-05 -2.917399e-05
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811655e+00  4.838288e-05  1.181752e+00
Function Value
[1] 80.30021
Gradient:
[1]  0.0000  0.0000  0.0000 40.4887 46.6018

iteration = 21
Step:
[1] -1.641092e-08 -6.407409e-09 -6.689164e-07 -1.391229e-05 -2.917383e-05
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811655e+00  3.447059e-05  1.181722e+00
Function Value
[1] 80.29828
Gradient:
[1]  0.00000  0.00000  0.00000 40.48883 46.60210

iteration = 22
Step:
[1] -1.641083e-08 -6.407373e-09 -6.689126e-07 -1.391221e-05 -2.917367e-05
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811656e+00  2.055838e-05  1.181693e+00
Function Value
[1] 80.29636
Gradient:
[1]  0.00000  0.00000  0.00000 40.48897 46.60240

iteration = 23
Step:
[1] -1.641074e-08 -6.407337e-09 -6.689089e-07 -1.391213e-05 -2.917350e-05
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  6.646253e-06  1.181664e+00
Function Value
[1] 80.29444
Gradient:
[1]  0.00000  0.00000  0.00000 40.48911 46.60270

iteration = 24
Step:
[1] -1.641065e-09 -6.407300e-10 -6.689051e-08 -1.391205e-06 -2.917334e-06
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  5.255047e-06  1.181661e+00
Function Value
[1] 80.29424
Gradient:
[1]  0.00000  0.00000  0.00000 40.48912 46.60273

iteration = 25
Step:
[1] -1.641064e-09 -6.407297e-10 -6.689047e-08 -1.391205e-06 -2.917332e-06
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  3.863843e-06  1.181658e+00
Function Value
[1] 80.29405
Gradient:
[1]  0.00000  0.00000  0.00000 40.48913 46.60276

iteration = 26
Step:
[1] -1.641063e-09 -6.407294e-10 -6.689044e-08 -1.391204e-06 -2.917331e-06
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  2.472639e-06  1.181655e+00
Function Value
[1] 80.29386
Gradient:
[1]  0.00000  0.00000  0.00000 40.48915 46.60279

iteration = 27
Step:
[1] -1.641062e-09 -6.407289e-10 -6.689040e-08 -1.391203e-06 -2.917329e-06
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  1.081436e-06  1.181652e+00
Function Value
[1] 80.29367
Gradient:
[1]  0.00000  0.00000  0.00000 40.48916 46.60282

iteration = 28
Step:
[1] -1.641061e-10 -6.407286e-11 -6.689036e-09 -1.391202e-07 -2.917327e-07
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  9.423159e-07  1.181652e+00
Function Value
[1] 80.29365
Gradient:
[1]  0.00000  0.00000  0.00000 40.48916 46.60283

iteration = 29
Step:
[1] -1.641061e-10 -6.407286e-11 -6.689036e-09 -1.391202e-07 -2.917327e-07
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  8.031957e-07  1.181652e+00
Function Value
[1] 80.29363
Gradient:
[1]  0.00000  0.00000  0.00000 40.48916 46.60283

iteration = 30
Step:
[1] -1.641061e-10 -6.407286e-11 -6.689035e-09 -1.391202e-07 -2.917327e-07
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  6.640754e-07  1.181652e+00
Function Value
[1] 80.29361
Gradient:
[1]  0.00000  0.00000  0.00000 40.48916 46.60283

iteration = 31
Step:
[1] -1.641061e-10 -6.407286e-11 -6.689035e-09 -1.391202e-07 -2.917327e-07
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  5.249553e-07  1.181651e+00
Function Value
[1] 80.29359
Gradient:
[1]  0.00000  0.00000  0.00000 40.48917 46.60284

iteration = 32
Step:
[1] -1.641061e-10 -6.407286e-11 -6.689034e-09 -1.391202e-07 -2.917327e-07
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  3.858351e-07  1.181651e+00
Function Value
[1] 80.29357
Gradient:
[1]  0.00000  0.00000  0.00000 40.48917 46.60284

iteration = 33
Step:
[1] -1.641061e-10 -6.407286e-11 -6.689034e-09 -1.391202e-07 -2.917326e-07
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  2.467149e-07  1.181651e+00
Function Value
[1] 80.29355
Gradient:
[1]  0.00000  0.00000  0.00000 40.48917 46.60284

iteration = 34
Step:
[1] -1.641061e-10 -6.407286e-11 -6.689034e-09 -1.391202e-07 -2.917326e-07
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  1.075947e-07  1.181650e+00
Function Value
[1] 80.29353
Gradient:
[1]  0.00000  0.00000  0.00000 40.48917 46.60285

iteration = 35
Step:
[1] -1.641065e-11 -6.407319e-12 -6.689032e-10 -1.391202e-08 -2.917326e-08
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  9.368269e-08  1.181650e+00
Function Value
[1] 80.29353
Gradient:
[1]  0.00000  0.00000  0.00000 40.48917 46.60285

iteration = 36
Step:
[1] -1.641065e-11 -6.407319e-12 -6.689032e-10 -1.391202e-08 -2.917326e-08
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  7.977067e-08  1.181650e+00
Function Value
[1] 80.29353
Gradient:
[1]  0.00000  0.00000  0.00000 40.48917 46.60285

iteration = 37
Step:
[1] -1.641065e-11 -6.407319e-12 -6.689032e-10 -1.391202e-08 -2.917326e-08
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  6.585866e-08  1.181650e+00
Function Value
[1] 80.29353
Gradient:
[1]  0.00000  0.00000  0.00000 40.48917 46.60285

iteration = 38
Step:
[1] -1.641065e-11 -6.407319e-12 -6.689032e-10 -1.391202e-08 -2.917326e-08
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  5.194664e-08  1.181650e+00
Function Value
[1] 80.29353
Gradient:
[1]  0.00000  0.00000  0.00000 40.48917 46.60285

iteration = 39
Step:
[1] -1.641065e-11 -6.407319e-12 -6.689032e-10 -1.391202e-08 -2.917326e-08
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  3.803462e-08  1.181650e+00
Function Value
[1] 80.29352
Gradient:
[1]  0.00000  0.00000  0.00000 40.48917 46.60285

iteration = 40
Step:
[1] -1.641065e-11 -6.407319e-12 -6.689032e-10 -1.391202e-08 -2.917326e-08
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  2.412261e-08  1.181650e+00
Function Value
[1] 80.29352
Gradient:
[1]  0.00000  0.00000  0.00000 40.48917 46.60285

iteration = 41
Step:
[1] -1.641065e-11 -6.407319e-12 -6.689032e-10 -1.391202e-08 -2.917326e-08
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  1.021059e-08  1.181650e+00
Function Value
[1] 80.29352
Gradient:
[1]  0.00000  0.00000  0.00000 40.48917 46.60285

iteration = 42
Parameter:
[1] -8.279278e-01  5.147729e-01 -5.811657e+00  1.021059e-08  1.181650e+00
Function Value
[1] 80.29352
Gradient:
[1]       0.00000       0.00000       0.00000 -506861.07675      46.60285

Last global step failed to locate a point lower than x.
Either x is an approximate local minimum of the function,
the function is too non-linear for this algorithm,
or steptol is too large.

difFGLS:
[1] 1.1763440 0.3818257 5.8156840
fixed effect betas changed to FGLS-betas for re-estimation
iteration = 0
Step:
[1] 0 0 0 0 0
Parameter:
[1] 3.484162e-01 1.329472e-01 4.027072e-03 1.021059e-08 1.181650e+00
Function Value
[1] 42.21514
Gradient:
[1]  1.3966371 -0.5273326 36.2719095  3.2599153 78.8275636

iteration = 1
Step:
[1] -4.978551e-11  1.879769e-11 -1.292975e-09 -1.162053e-10 -2.809944e-09
Parameter:
[1] 3.484162e-01 1.329472e-01 4.027071e-03 1.009439e-08 1.181650e+00
Function Value
[1] 42.21514
Gradient:
[1]  1.396637 -0.527333 36.271877  3.259915 78.827564

iteration = 2
Parameter:
[1] 3.484162e-01 1.329472e-01 4.027071e-03 1.006132e-08 1.181650e+00
Function Value
[1] 42.21514
Gradient:
[1]  1.3966363 -0.5273331 36.2718680  3.2599151 78.8275638

Successive iterates within tolerance.
Current iterate is probably solution.

difFGLS:
[1] 6.492118e-11 3.201203e-11 1.661003e-09

******************************************
*** GOOD convergence indicated by FGLS ***
******************************************
Warning messages:
1: In polygenic(dm2 ~ sex + age, kin = gkin, ge03d2ex.clean, trait = "binomial") :
  some eigenvalues close/less than 1e-8, setting them to 1e-8
you can also try option llfun='polylik' instead
2: In sqrt(fi) : NaNs produced
$minimum
[1] -51.17526

$estimate
[1] 3.484162e-01 1.329472e-01 4.027071e-03 1.006132e-08 1.181650e+00

$gradient
[1]  1.3966363 -0.5273331 36.2718680  3.2599151 78.8275638

$code
[1] 2

$iterations
[1] 2

GenABEL documentation built on May 30, 2017, 3:36 a.m.

Related to polygenic in GenABEL...