# Very basic GLM help

**URL:** <https://discourse.julialang.org/t/very-basic-glm-help/49832>\
**Category:** New to Julia\
**Tags:** regression, fit, glm\
**Created:** [November 9, 2020, 11:30am UTC](https://discourse.julialang.org/t/very-basic-glm-help/49832 "2020-11-09T11:30:37Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![HelgavonLichtenstein](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/helgavonlichtenstein/32/5005_2.png) [@HelgavonLichtenstein](https://discourse.julialang.org/u/HelgavonLichtenstein)\
**Post date:** [November 9, 2020, 2:47pm UTC](https://discourse.julialang.org/t/very-basic-glm-help/49832/5 "2020-11-09T14:47:45Z")

</div>

Thank you for your reply, removing `:` let it calculate the formula. I thought `y` and `x` could be replaced by column headings.

Now I am trying to plot it but have difficulties. Basically I want to do is what is done in R with the commands`geom_smooth(method = "lm")` and `geom_smooth(method = "loess")`.

Following the example [here](https://discourse.julialang.org/t/plot-the-confidence-interval-for-a-model-fit/37767)

```julia
df = DataFrame(A = rand(500), B = repeat(1:10, inner=50), C = 1:500)
linear_model_df = lm(@formula(A ~ C),df)
pred = DataFrame(df(C)); #this does not work
pred.y = predict(model, pred)

```

Edit: I guess I am confused when to use `x` and `y` and when to use column headings.

Does one always need to state the intervals for the x axis?

---

_[View the full topic](https://discourse.julialang.org/t/very-basic-glm-help/49832)._
