# Tag Info

21

The remarks in the question about link functions and monotonicity are a red herring. Underlying them seems to be an implicit assumption that a generalized linear model (GLM), by expressing the expectation of a response $Y$ as a monotonic function $f$ of a linear combination $X\beta$ of explanatory variables $X$, is not flexible enough to account for ...

16

Your example is a very good one because it clearly points up recurrent issues with such data. Two common names are power function and power law. In biology, and some other fields, people often talk of allometry, especially whenever you are relating size measurements. In physics, and some other fields, people talk of scaling laws. I would not regard ...

13

See the nls() function. It has a self starting logistic curve model function via SSlogis(). E.g. from the ?nls help page > library("nls") > DNase1 <- subset(DNase, Run == 1) > > ## using a selfStart model > fm1DNase1 <- nls(density ~ SSlogis(log(conc), Asym, xmid, scal), + DNase1) I suggest you read the help ...

12

Let's create some data. n <- 100 x <- seq(n) y <- rnorm(n, 50 + 30 * x^(-0.2), 1) Data <- data.frame(x, y) The following shows how you can fit a loess line or the fit of a non-linear regression. plot(y ~ x, Data) # fit a loess line loess_fit <- loess(y ~ x, Data) lines(Data$x, predict(loess_fit), col = "blue") # fit a ... 11 Time is allowed; whether it is needed will depend on what you are trying to model? The problem you have is that you have covariates that together appear to fit the trend in the data, which Time can do just as well but using fewer degrees of freedom - hence they get dropped out instead of Time. If the interest is to model the system, the relationship between ... 11 There are several issues here. (1) The model needs to be explicitly probabilistic. In almost all cases there will be no set of parameters for which the lhs matches the rhs for all your data: there will be residuals. You need to make assumptions about those residuals. Do you expect them to be zero on the average? To be symmetrically distributed? To be ... 10 There are many ways to smooth. Depending on how much effort you're prepared to go to, any of can be done in matlab (and probably already exist somewhere) and Excel (but you might have to do them yourself). [If you were asking about R I'd show you three or four ways you might smooth data.] That "smooth approximation" in the image just looks quadratic to me, ... 9 This is a generalized linear model (GLM) with a log link function. Any probability distribution on$[0,\infty)$with non-zero density at zero will handle$y_i=0$in some observations; the most common would be the Poisson distribution, resulting in Poisson regression, a.k.a. log-linear modelling. Another choice would be a negative binomial distribution. If ... 9 A (negative) exponential law takes the form$y=-\exp(-x)$. When you allow for changes of units in the$x$and$y$values, though, say to$y = \alpha y' + \beta$and$x = \gamma x' + \delta$, then the law will be expressed as $$\alpha y' + \beta = y = -\exp(-x) = -\exp(-\gamma x' - \delta),$$ which algebraically is equivalent to $$y' = \frac{-1}{\alpha} ... 9 ...the relationship is nonlinear yet there is a clear relation between x and y, how can I test the association and label its nature? One way of doing this would be to fit y as a semi-parametrically estimated function of x using, for example, a generalized additive model and testing whether or not that functional estimate is constant, which would ... 8 Your question is a bit vague, so I'm going to make some assumptions about what your problem is. It would help a lot if you could put up a scatterplot and describe the data a bit. Please, if I'm making bad assumptions then ignore my answer. First, it's possible that your data describe some process which you reasonably believe is non-linear. For instance, if ... 8 If you use ggplot2 (the third plotting system, in R, after base R and lattice), this becomes: library(ggplot2) ggplot(Data, aes(x,y)) + geom_point() + geom_smooth() You can choose how the data is smoothed: see ?stat_smooth for details and examples. 7 I will assume the values of all the variables and constants are such that there won't be problems with obtaining square roots of negative numbers. Then$$\frac{\sqrt{c_1 x + c_2 \exp(x)^y}}{\sqrt{\exp(x)^y}} + c_3 =\sqrt{c_2 + c_1 x \exp(-y x)} + c_3.$$When y \gt 0 then eventually, for sufficiently large x, \frac{c_1}{c_2} x \exp(-y x) gets small ... 7 This is called the Delta Method. Suppose that you have some function y = G(\beta,x) + \epsilon; note that G(\cdot) is a function of the parameters that you estimate, \beta, and the values of your predictors, x. First, find the derivative of this function with respect to your vector of parameters, \beta: G^\prime(\beta, x). This says, if you ... 7 There are several problems in this question. First, there is the question of whether bootstrapped averages will be sensible estimators even when some of the individual bootstrapped estimators are not computable (lack of convergence, non-existence of solutions). Second, given that the bootstrapped estimators are sensible, there is a question of how to obtain ... 7 There appears to be some discrepancy here regarding what a proof of identification entails and what you are trying to prove. Let me rewrite your model as$$ Y_i = \exp(\boldsymbol{X}_i'\boldsymbol{\beta}^0) + U_i$$where$\boldsymbol{X}_i = [X_{1i},\ldots, X_{Ki}]'$, together with the assumption that$\mathbb{E}(U_i \mid \boldsymbol{X}_i)=0$. It appears ... 7 I would avoid the question altogether as secondary. The issue is the choice between two models, a linear fit and an exponential approach to an asymptote. The linear model may possibly be an acceptable fit depending partly on the range of your data, but a negative intercept implies negative productivity for zero rainfall and a positive intercept implies ... 7 "Better" is a function of your model. Part of the reason for your confusion is you only wrote half of your model. When you say$y=ax^b$, that's not actually true. Your observed$y$values aren't equal to$ax^b$; they have an error component. For example, the two models you mention (not the only possible models by any means) make entirely different ... 6 The answers above are, of course, correct. For what its worth, in addition to the explanations given, if you are trying this on an artificial data set, according to the nls help page found at: http://stat.ethz.ch/R-manual/R-patched/library/stats/html/nls.html R's nls wont be able to handle it. The help page specifically states: Warning Do not ... 6 Do your analysis with several different kernels. Make sure you cross-validate. Choose the kernel that performs the best during cross-validation and fit it to your whole dataset. /edit: Here is some example code in R, for a classification SVM: #Use a support vector machine to predict iris species library(caret) library(caTools) #Choose x and y x <- ... 6 Several tests for outliers, including Dixon's and Grubb's, are available in the outlier package in R. For a list of the tests, see the documentation for the package. References describing the tests are given on the help pages for the corresponding functions. In case you were planning to remove the outliers from your data, bear in mind that this isn't always ... 6 Without knowing exactly what you are looking for, using the lattice package you can easily add a loess curve with type="smooth"; e.g., > library(lattice) > x <- rnorm(100) > y <- rnorm(100) > xyplot(y ~ x, type=c("smooth", "p")) See help("panel.loess") for arguments that can be passed to the loess fitting routine in order to change, for ... 6 If there was a good general strategy that always worked it would already be implemented in every nonlinear least squares program and starting values would be a non-issue. For many specific problems, some pretty good approaches to starting values exist. Exploring the space is necessary in some situations but I think your situation is likely to be such that ... 6 To put the argument of @alecos-papadopoulos in graphical terms: Say his$a$is -1 and his$b$is 0.5 and$x$ranges between 0 and 2. If we were to graph that relationship we could type in Stata: twoway function Pr = invlogit(-1+0.5*x), range(0 2) lwidth(medthick) That would result in the following graph: which looks pretty linear. However, if we were ... 5 These models are not the same, because the first is a rational function of$x$and the second is an exponential function. The second one is truly a "logistic" model but the first is not. Moreover, the claims about$B$and$C$in the first model are not true. The maximum slope depends on$C$, which is a scale parameter, not a location parameter. Moreover, ... 5 The degree of interaction is the maximum degree of input terms in the regression function. For example a model such as$y=0.5x_1+0.2x_2 -.3$has degree$1$. While$y=0.5x_1+0.2x_2 + .05x_1x_2-.3$has degree$2$. For simplicity, I have given a linear regression example instead of MARS. Or, paraphrasing from the wikipedia entry, something like$\text{ozone} = ...

5

then, you might want to try additive models for quantile regressions (some pics/explanation here, and the $\verb+R+$ implementation here). These have various desirable properties: They resemble classical scatter plot smoother but they are truly non parametric in the sense that they do not assume Gaussian distribution of the residuals (for instance you're ...

5

Here's the notation I'm going to use for the sigmoid model: $y = U + \frac{L - U}{1 + (\frac{x}{x_0})^k}$ The problem is that the sigmoid model nests functions that are close to linear within a bounded domain, and further, that very different parameter values give rise to almost-lines that are almost the same. Check it out: sigmoid <- function(x, L, U, ...

5

Neither am I a statistician. Therefore I use my expert knowledge about the data to find outliers. I.e. I look for physical/biological/whatever reasons that made some measurements different from the others. In my case that is e.g. cosmic rays messing up part of the measured signal someone entering the lab, switching on the light just the whole spectrum ...

5

It seems to me you are actually looking for a regression models with re-descending loss function ("far away points are weighted less than close ones") loss function. Such loss functions --for example the Tukey biweight-- lead to highly non-convex optimization problems, meaning that there are, potentially, a finite but factorial-order increasing number of ...

Only top voted, non community-wiki answers of a minimum length are eligible