Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 40036

Techniques for analyzing the relationship between one (or more) "dependent" variables and "independent" variables.

1 vote

Proper way to evaluate models fitted to standardized data

set split, you are selecting 16 observations for the training set and 16 for the testing set: train <- sample(1:nrow(data),nrow(data)*0.5) test <- setdiff(1:nrow(data),train) This means your linear regression … models are being fitted with 16 observations and 10 independent variables; this almost certainly leads to significant overfitting to the training data, which is why your out-of-sample MSE is poor for the regression
josliber's user avatar
  • 4,389
6 votes
Accepted

Linear-Regressing Y on X : Interpreting coefficient 1

No, just because a coefficient value is close to 1 in multiple linear regression does not imply that the variable is almost equal to the outcome. … 0.1 2 # 3 3.0997 0.1 3 # 4 4.0001 0.0 4 # 5 4.9999 0.0 5 In this dataset, the outcome variable y is basically equal to the sum of the two independent variables x1 and x2; as expected the linear regression
josliber's user avatar
  • 4,389
3 votes
Accepted

sum of the x's and the sample mean issues

By definition, $$ \bar x = \frac{\sum_{j=1}^n x_j}{n} $$ So multiplying through by $n$ yields the result that $\sum_{j=1}^n x_j = n\bar x$.
josliber's user avatar
  • 4,389
2 votes
Accepted

Can I estimate the optimal proportions of ingredients in a blend?

Mathematical optimization is a tool that is often used to optimize a decision given some objective function and some constraints. In your case, the decision variables would be the amount of each ingr …
josliber's user avatar
  • 4,389
1 vote
Accepted

Dummy variable for level measurement

You might consider instead using segmented regression, which models $y$ as a piecewise linear function of $x$. … Segmented regression is implemented in R in the segmented package. …
josliber's user avatar
  • 4,389
6 votes

Discrepancy in Cholesky decomposition matrix from variance covariance matrix obtained in Sta...

From the Stata documentation, the cholesky function returns a lower triangular matrix $G$ such that $A = GG'$ given input matrix $A$. Meanwhile, from the R documentation, chol returns an upper triangu …
josliber's user avatar
  • 4,389
4 votes
Accepted

Is it possible to compute RMSE iteratively?

An update formula in a similar vein to the one you provided for updating MAE would be: $$ RMSE_t = \sqrt{\frac{t-1}{t}RMSE_{t-1}^2 + \frac{(y_t^{true}-y_t^{pred})^2}{t}} $$ Here I assume you have ha …
josliber's user avatar
  • 4,389
1 vote
Accepted

glmer.nb does not converge when one variable is included in the model

The warning messages you received are informative here: 2: Some predictor variables are on very different scales: consider rescaling So it seems like a good approach is to rescale some variabl …
josliber's user avatar
  • 4,389
29 votes

For linear classifiers, do larger coefficients imply more important features?

To see this, consider a linear regression model predicting the petal width of an iris (in centimeters) given its petal length (in centimeters): summary(lm(Petal.Width~Petal.Length, data=iris)) # Call … model predicting Z with X has R^2 value 0.2065, while the linear regression model predicting Z with Y has R^2 value 0.0511): summary(lm(Z~X, data=dat)) # Call: # lm(formula = Z ~ X, data = dat) # # …
josliber's user avatar
  • 4,389
12 votes
Accepted

How is it possible to get a high $R^²$ & still have 'poor predictions'?

Consider two regression models. …
josliber's user avatar
  • 4,389