# Automating backward or forward elimination of features for a multiple linear regression problem

**URL:** <https://discourse.julialang.org/t/automating-backward-or-forward-elimination-of-features-for-a-multiple-linear-regression-problem/10323>\
**Category:** General Usage\
**Tags:** question\
**Created:** [April 13, 2018, 12:33pm UTC](https://discourse.julialang.org/t/automating-backward-or-forward-elimination-of-features-for-a-multiple-linear-regression-problem/10323 "2018-04-13T12:33:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fdabhi](https://avatars.discourse-cdn.com/v4/letter/f/e0b2c6/32.png) [@fdabhi](https://discourse.julialang.org/u/fdabhi)\
**Post date:** [April 13, 2018, 12:33pm UTC](https://discourse.julialang.org/t/automating-backward-or-forward-elimination-of-features-for-a-multiple-linear-regression-problem/10323/1 "2018-04-13T12:33:55Z")

</div>

Trying to replicate the code in python found [here](https://stackoverflow.com/a/48573261/1861349) and [here](https://stackoverflow.com/a/29835822/1861349)

Using GLM package to fit the model  
Was able to store the P values inside a variable by using the method described [here](http://julia-programming-language.2336112.n4.nabble.com/How-to-get-the-p-value-in-GLM-td5990.html)

Question is how do you access the column name in the formula by using indexes.

Example - my formula is `@formula(Price~ Size+ Location+ Rooms)`  
where by csv file contains data with columns names Size, Location, Rooms and Price

I wanted something like `@formula(4~ 1+ 2+ 3)`

Is this possible ?
