![]() If you build a regression model with GLM, you’ll get a lot more useful information about your model than you would by just plotting the line (e.g. In the case of plotting a regression line, I believe in Excel you can get the coefficients as well as the R^2 but I don’t think you can get anything else when using the plotting feature (that’s how it was when I used to use it for this). In other words, a plotting package probably isn’t fit for the purpose of building models and should therefore only provide limited, if any, model-building capabilities.Īs others have pointed out, there are lots of packages for fitting curves to data (I would add GLM.jl) and if they don’t already have plot recipes, it’s pretty straight forward to generate the data necessary to plot via Plots.jl. While correlation describes how two variables relate to one another the Line of Best Fit is graph showing the general direction that a group of points seem to. Julia is designed in such a way that allows for the composition of separate code/modules that are able to interact and play nicely with one another so it’s pretty typical to have small modules that have a narrow scope and then to simply load another fit-for-purpose module, as needed. I would just add that this is a feature and not a bug. I am curious how other people view this, or any information I could have about the Julia equivalent. Plot!(average_point, colour = :black, lw = 2.0, label = "average", leg = :outerright) using DataFrame, StatsPlotsĪverage_point = ),mean(asdf),mean(asdf),mean(asdf),mean(asdf),mean(asdf)] I tried making my own line of best fit, but it’s actually just the average of the points. It uses a specified number of data points (two is the default), averages them, and then uses this value as a point in the trendline. Moving Average: To smooth out the fluctuations in your data and show a trend more clearly, use this type of trendline.Logarithmic: This type is best used when the data increases or decreases quickly, and then levels out. ![]() The line is more curved than a linear trendline. Exponential: This trendline visualizes an increase or decrease in values at an increasingly higher rate.Linear: A straight line used to show a steady rate of increase or decrease in values.In Excel, the options for trendlines are: I did a lot of plotting in Excel and am wondering how to or what the Julia version of a trendline/line of best fit is. Plots.abline!(bhat., label = "trendline") Plot(dates, my_values, xticks = (ticks, ticks_labels), label="my series") If any of those assumptions arent true, please update your question with the relevant additional info for a better solution. Maybe they are called something else? The only thing I’ve been able to find online is this: using LinearAlgebra that your chart is in a recent version of Excel, and that the 'best fit' line is actually an Excel trendline, derived from a data series of the associated points, and that your chart is an XY/Scatter chart. ![]() I’m quite surprised there are no posts about trendlines or lines of best fit on these forums.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |