Questions tagged [coefficients]

In mathematics, a coefficient is a multiplicative factor in some term of a polynomial, a series or any expression; it is usually a number, but in any case does not involve any variables of the expression.

In mathematics, a coefficient is a multiplicative factor in some term of a polynomial, a series or any expression; it is usually a number, but in any case does not involve any variables of the expression.

495 questions
23
votes
3 answers

Getting glmnet coefficients at 'best' lambda

I am using following code with glmnet: > library(glmnet) > fit = glmnet(as.matrix(mtcars[-1]), mtcars[,1]) > plot(fit, xvar='lambda') However, I want to print out the coefficients at best Lambda, like it is done in ridge regression. I see…
rnso
  • 23,686
  • 25
  • 112
  • 234
12
votes
3 answers

how to get standardised (Beta) coefficients for multiple linear regression using statsmodels

when using the .summary() function using pandas statsmodels, the OLS Regression Results include the following fields. coef std err t P>|t| [0.025 0.975] How can I get the standardised coefficients (which exclude the…
Andreuccio
  • 1,053
  • 2
  • 18
  • 32
12
votes
3 answers

How to display coefficients in scientific notation with stargazer

I want to compare the results of different models (lm, glm, plm, pglm) in a table in R using stargazer or a similar tool. However I can't find a way to display the coefficients in scientific notation. This is kind of a problem because the intercept…
Lukas Stäcker
  • 319
  • 3
  • 10
10
votes
1 answer

perform Deming regression without intercept

I would like to perform Deming regression (or any equivalent of a regression method with uncertainties in both X and Y variables, such as York regression). In my application, I have a very good scientific justification to deliberately set the…
agenis
  • 8,069
  • 5
  • 53
  • 102
9
votes
2 answers

Interpreting logistic regression feature coefficient values in sklearn

I have fit a logistic regression model to my data. Imagine, I have four features: 1) which condition the participant received, 2) whether the participant had any prior knowledge/background about the phenomenon tested (binary response in…
8
votes
2 answers

Getting weights of features using scikit-learn Logistic Regression

I am a little new to this. I am using a simple Logistic Regression Classifier in python scikit-learn. I have 4 features. My code is X_train, X_test, y_train, y_test = train_test_split(X, Y, test_size = 0.2, random_state = 42) classifier =…
8
votes
2 answers

Extracting coefficients and their standard error for each unit in an lme model fit

How could I extract coefficients (b0 and b1) with their respectively standard errors for each experimental unit (plot )in a linear mixed model such as this one: Better fits for a linear model with this same dataset(df), and for the fitted model…
Juanchi
  • 1,147
  • 2
  • 18
  • 36
7
votes
1 answer

Get the coefficients of a polynomial with Numpy

I'm trying to get the coefficients of a numpy.polynomial.polynomial.Polynomial obtained via the fit method: import numpy.polynomial as poly x = [1, 2, 3, 4, 5] y = [16, 42.25, 81, 132.25, 196] c = poly.Polynomial.fit(x, y, deg =…
Javier Garcia
  • 539
  • 1
  • 4
  • 15
7
votes
1 answer

Coefficients of polynomials maxima

Is there a built-in function in maxima to get from a polynomial function a list with its coefficients? And to get the degree of the polynomial? The most similar function I found is args, but it also returns the variable together with the…
Maximator
  • 83
  • 1
  • 5
7
votes
2 answers

How can I get the relative importance of features of a logistic regression for a particular prediction?

I am using a Logistic Regression (in scikit) for a binary classification problem, and am interested in being able to explain each individual prediction. To be more precise, I'm interested in predicting the probability of the positive class, and…
7
votes
2 answers

how to extract intercept and slope from a plot for large number of variables

I am trying to extract intercepts and slopes for 500 variables from a qplot. The code I am using: qplot(gd, nd, data = test, colour = factor(ENT)) + geom_smooth(method = "lm", se = FALSE) Could someone help me extract the intercept and slope for…
Ravi
  • 81
  • 1
  • 4
7
votes
2 answers

Standardized coefficients for lmer model

I used to use the code below to calculate standardized coefficients of a lmer model. However, with the new version of lme the structure of the returned object has changed. How to adapt the function stdCoef.lmer to make it work with the new lme4…
majom
  • 7,863
  • 7
  • 55
  • 88
6
votes
1 answer

How to create Polynomial Ring which has Float coefficients Julia

I want to create a polynomial ring which has float Coefficients like this. I can create with integers but, Floats does not work. using Oscar S, (a,b,c,d) = PolynomialRing(QQ,["a","b","c","d"]) RR = AbstractAlgebra.RealField s1 = S( 8*a -…
6
votes
2 answers

Difference between glm and LogitModelFit

I have a problem with glm function in R. Specifically, I am not sure how to include nominal variables. The results that I get in R after running the glm function are the following: > df x1 x2 y 1 a 2 0 2 b 4 1 3 a 4 0 4 b 2 1 5 a 4…
5
votes
1 answer

Find spline knots by variable in python

When fitting a linear GAM model in python imposing n_splines=5, a piecewise-linear function is fitted: import statsmodels.api as sm from pygam import LinearGAM data = sm.datasets.get_rdataset('mtcars').data Y = data['mpg'] X =…
PeCaDe
  • 277
  • 1
  • 8
  • 33
1
2 3
32 33