# Tag Info

## New answers tagged modeling

0

By exponential decay you mean 100*(1-exp r t)? Then divide by 100, subtract 1 and take logs. Now you can do a linear regression on t. But as mentioned you can add polynomial or spline terms .. eg your model could be 100*(1-exp(at + b t^2))

0

The short answer is that there's no easy, non-hacky way to do this using lm() in R. There may exist some hack to fit a model that will end up having the coefficient vector you want (one that includes a 0 for the intercept term), but honestly the easiest way to proceed is to just fit the model with intercept suppressed and then manually append a 0 to the ...

4

It is best to look at the distribution of waiting times for a particular provider. My first thought would be that if the process is anything like a queueing If process that the distribution should be nearly exponential. So I would check to see if the sample mean and standard deviation are approximately equal. If so, I would look to see if an empirical CDF (...

0

In this specification, changes in hormone level would be associated with changes in age level. So if I am correct, an increase in the magnitude of the change in hormone is associated with a smaller change in weight.

2

If I understand this correctly. you are mainly interested in looking for significant differences among Models (columns) in your table. Also, it seems a stretch to assume these data are normal. So, I would suggest a nonparametric Friedman test, using Years as blocks. [In effect we're assuming Years (blocks) differ, and the Friedman procedure will provide no ...

2

So it appears that the result of surgery has been over-simplified down to a 0/1 outcome, meaning that a much larger sample size will be required in order to build a reliable model, e.g., at least a few hundred surgical failures. The choice of a model for binary Y is the binary logistic regression model. Multinomial logistic regression would be used if Y ...

0

Based on his textbook for a non-seasonal time series, a useful way to define a scaled error uses naïve forecasts: $$q_{j} = \frac{\displaystyle e_{j}}{\displaystyle\frac{1}{T-1}\sum_{i=1}^T |y_t-y_{t-1}|}$$ Acoording to his answer here, it is possible to scale the data using the mean as the base forecast. If $e_j$ denotes a prediction error on the test ...

0

I developed a churn scoring for a company months ago. Personnaly what i did was: Train on January, evaluation on Feb/May/Sep and for each compute the lift, the gain and the % of each deciles. All these metrics must stay stable through time, lift and gain for the performance, % for the stability. Theses metrics can be monitored each month on a dashboard, ...

3

It seems that "label encoding" just means using numbers for labels in a numerical vector. This is close to what is called a factor in R. If you should use such label encoding do not depend on the number of unique levels, it depends on the nature of the variable (and to some extent on software and model/method to be used.) Coding should be seen as a part of ...

1

As commented by @thebigdog, "On the use of cross-validation for time series predictor evaluation" by Bergmeir et al. discusses cross-validation in the context of stationary time-series and determine Forward Chaining (proposed by other answerers) to be unhelpful. Note, Forward Chaining is called Last-Block Evaluation in this paper: Using standard 5-fold ...

1

Very briefly: AIC approximately minimizes the prediction error and is asymptotically equivalent to leave-1-out cross-validation (LOOCV) (Stone 1977). It is not consistent though, which means that even with a very large amount of data ($n$ going to infinity) and if the true model is among the candidate models, the probability of selecting the true model ...

3

The variable you are trying to explain is an aggregate variable. You have to aggregate the loan characteristics (try different summary statistics: sum, mean, median and a few other quantiles, higher moments etc.) and try to tease out a relationship between the loan count and these aggregated characteristics. You might have to add macroeconomic variables ...

3

There have already been given many good answers to your question, but I'd like to add a few points that have not yet been raised. 1. Not all parameters in a model need to have an interesting interpretation By this I mean that sometimes models can have so called "nuisance parameters", i.e. parts of a model that are not of primary interest but that we need ...

1

It's not a very good idea to force the intercept term to be zero in this case. Why I'm saying so is, anyway we cannot get the exact relationship between the two variables and there might be other factors affecting the response which are not taken into account here. Also, in regression, extrapolation is not advised. So when you fit a regression equation ...

0

You could use glmmTMB to do beta regression using the argument family=beta_family. It can do either GLMs or GLMMs, so random effect can be included. I don't think the beta family has been extensively tested, but it should work as far as we know.

3

For me, the main point is that the true relationship between $Y$ and $x$ is seldom exactly linear over the full imaginable range of $x.$ However, over a short interval $(x_0, x_1)$ of interest, the relationship may be sufficiently near to linear to get very useful results from the simple linear model $Y_i = \beta+0 + \beta_1 X_i + e_i.$ For example, here is ...

2

Variance is the spread of the residuals: their tendency to depart from zero, as measured by their typical (root mean square) distance from zero. The left hand plot uses height to represent the residuals, but there is no discernible variation the amounts by which heights typically deviate from the zero value (near the middle) as one scans across the plot. ...

4

You propose a simple linear regression of the form $$\text{Number of stores}= \beta_0 + \beta_1 \text{GDP}+\text{Error}$$ so yes, the constant $\beta_0$ is the expected number of stores when GDP is zero, which isn't very meaningful, as you say. But, first, there is usually no need to interpret the coefficient. If you want a more interpretable value for ...

0

The confidence intervals generated by OLS can be biased downwards in the heteroskedasticity case. So, we need to use robust standard errors if we are concerned about the t-stats of coefficient estimates. More information can be found here. The other problem is efficiency (ie. do we use the information embedded in our data well?). An observation with higher ...

Top 50 recent answers are included