On the third hand (running out of hands) - you're talking about trends? Is this a temporal problem? If it is, be a little cautious with over interpreting trend lines and statistical significance. For this, use model <- loess(y ~ x, data=dataset, span=.), where the span variable controls the degree of smoothing. Loess is just like that but uses regression instead of a straight average. It's easiest to imagine a "k nearest-neighbour" version, where to calculate the value of the curve at any point, you find the k points nearest to the point of interest, and average them. This does linear regression on a small region, as opposed to the whole dataset. On the other hand, if you've got a line which is "wobbly" and you don't know why it's wobbly, then a good starting point would probably be locally weighted regression, or loess in R. Station 2: Complete an x y table for a given equation, the write the slope by finding the change in y and change in x.-. Sample Plot: Linear Relationship Between Variables Y and X This sample plot of the Alaska pipeline data reveals a linear relationship between the two variables indicating that a linear regression model might be appropriate. Station 1: Determine if an xy table shows a linear or nonlinear function by deciding if the change in y and x is constant. There's a lot of documentation on how to get various non-linearities into the regression model. This activity includes 3 stations that should take 10-15 minutes each. So you might want to try polynomial regression in this case, and (in R) you could do something like model <- lm(d ~ poly(v,2),data=dataset). For instance, if you're trying to do regression on the distance for a car to stop with sudden braking vs the speed of the car, physics tells us that the energy of the vehicle is proportional to the square of the velocity - not the velocity itself. Please, if I'm making bad assumptions then ignore my answer.įirst, it's possible that your data describe some process which you reasonably believe is non-linear. In the linear form: Ln Y B 0 + B 1 lnX 1 + B 2 lnX 2. For instance, you can express the nonlinear function: Ye B0 X 1B1 X 2B2. A log transformation allows linear models to fit curves that are otherwise possible only with nonlinear regression. It would help a lot if you could put up a scatterplot and describe the data a bit. Curve Fitting with Log Functions in Linear Regression. Your question is a bit vague, so I'm going to make some assumptions about what your problem is.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |