# World Age Error with fit(LinearModel, @(Y ~ X), data) with GLS and DataFrame Package

**URL:** https://discourse.julialang.org/t/world-age-error-with-fit-linearmodel-y-x-data-with-gls-and-dataframe-package/7570
**Category:** New to Julia
**Created:** [December 6, 2017, 2:37pm UTC](https://discourse.julialang.org/t/world-age-error-with-fit-linearmodel-y-x-data-with-gls-and-dataframe-package/7570 "2017-12-06T14:37:36Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Julia\_User](https://avatars.discourse-cdn.com/v4/letter/j/58956e/32.png) [@Julia\_User](https://discourse.julialang.org/u/Julia_User)
#### Post date: [December 6, 2017, 2:37pm UTC](https://discourse.julialang.org/t/world-age-error-with-fit-linearmodel-y-x-data-with-gls-and-dataframe-package/7570/1 "2017-12-06T14:37:36Z")

</div>

Hello everybody,

I am evaluating this very easy code snippet and it is evaluating to a world age error.

```julia
Pkg.update()
using DataFrames, Plots, GLM, uCSV, ExcelReaders, CovarianceMatrices, CSV, NullableArrays

X=[0.1:0.2:1.1]
Y=[0.1:0.2:1.1]

data=DataFrame()
data[:X]=X
data[:Y]=Y

model_test = fit(LinearModel, @formula(Y ~ X),data)
stderr(model_test, HC1)

```

Console Output:

```julia
INFO: Updating METADATA...
INFO: Computing changes...
INFO: No packages to install, update or remove

WARNING: Method definition 1-element Array{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},1}==(:Base.
Nullable{ S}0.1:0.2:1.1, Base.Nullable{
T}1-element Array{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},1}) in module Base: at nullable.jl:238
 overwritten in module NullableArrays at C:\Users\Jiyo\.julia\v0.6\NullableArrays\src\operators.jl:99.
0.1:0.2:1.1

0×0 DataFrames.DataFrame
1-element Array{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},1}:
 0.1:0.2:1.1
1-element Array{StepRangeLen{Float64,Base.TwicePrecision{Float64},Base.TwicePrecision{Float64}},1}:
 0.1:0.2:1.1
 ERROR: MethodError: no method matching @formula(::Expr)
The applicable method may be too new: running in world age 21842, while current world is 24127.
Closest candidates are:
  @formula(::ANY) at C:\Users\Julia_User\.julia\v0.6\DataFrames\src\statsmodels\formula.jl:20 (method too new to be called from this world context.)  
ERROR: UndefVarError: model_test not defined

```

Packages are up to date. Is this a editor/ hardware problem? I am using emacs/ESS.

---

<div class="post-metadata">

### Author: ![nalimilan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nalimilan/32/147_2.png) [@nalimilan](https://discourse.julialang.org/u/nalimilan)
#### Post date: [December 8, 2017, 8:39am UTC](https://discourse.julialang.org/t/world-age-error-with-fit-linearmodel-y-x-data-with-gls-and-dataframe-package/7570/2 "2017-12-08T08:39:57Z")

</div>

Please post links to other issues you file when cross-posting:  
[https://github.com/JuliaStats/GLM.jl/issues/204](https://github.com/JuliaStats/GLM.jl/issues/204)
