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
2
votes
1 answer

fit glm with known coefficients and unknown intercept

I am trying to fit a logistic regression model using glm, where I am only interested in the intercept - but I still want the model to be fitted with known coefficients. Example: or beta <- c(24.5,3.6,2.87,7.32) So I want to use model <-…
Camilla
  • 113
  • 2
  • 12
2
votes
1 answer

Pass offset arguments into lm function

I am doing a linear regression and I would like to fix some inputs. I have found the way to do this with offset. Let's see it in example: set.seed(145) df <- data.frame(a = rnorm(10), b = rnorm(10), c = rnorm(10), d = rnorm(10)) summary(lm(formula…
Andriy T.
  • 2,020
  • 12
  • 23
2
votes
0 answers

R: Hat matrix in ridge regression using glmnet package

I am working with glmnet package (R) and I need to extract hat-matrix for ridge regression in order to test coefficient's significance. I've looked up the documentation and the source code of the function glmnet, but I found no clues about how to…
2
votes
0 answers

MATLAB: fir1 command is incompatible fir2 command

MATLAB said "The fir2 function also designs windowed FIR filters, but with an arbitrarily shaped piecewise linear frequency response. This is in contrast to fir1, which only designs filters in standard lowpass, highpass, bandpass, and bandstop…
yigit
  • 21
  • 2
2
votes
1 answer

Linking sklearn LogisticRegression coefficients to terms in a sparse matrix, and getting statistical significance / C.I

This is a continuation of a question that started in another thread. I have run a logistic regression using sklearn using code similar to that below: from pandas import * from sklearn.feature_extraction.text import CountVectorizer from sklearn…
araspion
  • 693
  • 1
  • 9
  • 24
2
votes
1 answer

How to repeat a process N times?

I have: x = rnorm(100) # Partie b z = rbinom(100,1,0.60) # Partie c y = 1.4 + 0.7*x - 0.5*z # Partie d x1 = abs(x) y1 = abs(y) Don<-cbind(y1,x1,z) Don1 <- data.frame(Don) Reg <- glm(y1~x1+z,family=poisson(link="log"),Don1) # Partie e #Biais de…
alison monroe
  • 21
  • 1
  • 1
  • 7
2
votes
3 answers

Storing coefficient estimates for models with different coefficients

I am trying to store the coefficient estimates for different models. To illustrate my problem, Here is an Example below. library(fpp) creditlog <- data.frame(score=credit$score, log.savings=log(credit$savings+1), …
Adrien
  • 151
  • 1
  • 8
2
votes
2 answers

Given a list of coefficients, create a polynomial

I want to create a polynomial with given coefficients. This seems very simple but what I have found till now did not appear to be the thing I desired. For example in such an environment; n = 11 K = GF(4,'a') R = PolynomialRing(GF(4,'a'),"x") x =…
S.B.
  • 165
  • 1
  • 8
2
votes
1 answer

Coefficient Correlation Over a Large Binary Image Data-Set - Slow Performance

I am trying to build an OCR by calculating the Coefficient Correlation between characters extracted from an image with every character I have pre-stored in a database. My implementation is based on Java and pre-stored characters are loaded into an…
javasuns
  • 1,061
  • 2
  • 11
  • 22
1
vote
1 answer

Is there a good way to drop coefficients of a Julia polynomial

I am doing computations with Julia polynomials of rationals. After an operation I might have a polynomial of high degree, I want to truncate to a polynomial of a smaller degree by throwing out the higher order terms. I figured out a solution below.…
Josh
  • 11
  • 2
1
vote
2 answers

Polynomial fitting and solve the coefficients

I have have plot 'energy1' vs 'amp'. I wrote the following code to, a) draw a 4th order polynomial fitting curve for the data set b) get the coefficients of the polynomial However, the function f1 prints as, " f1= 29.16 x^4 + 9.809e-07 x^3 - 73.08…
Bip
  • 55
  • 5
1
vote
0 answers

backTrasform, lnearComb, coefficients, unmarked

I am running an occupancy analysis and I am using "backTransofrm" to estimate the general "p" and "psi". This is my final model: Occupancy: Estimate SE z P(>|z|) (Intercept) -0.391 0.554 -0.706 0.480 dist_water -0.931…
Edoardo
  • 11
  • 1
1
vote
0 answers

How to extract the "coefficients" of a symbolic matrix?

Given a symbolic square matrix y (Matlab code: syms y [n n] matrix;), for a symbolic matrix of the form x=y+Ay+yB+CyD+EyF+... (where A, B, C, D, E, F... are numerical matrices), how can one separate the numerical matrices from x as matrices A, B, C,…
1
vote
1 answer

Plotting coefficients from multiple regression models with plot_coefs /plot_summs, maximum number?

I run 15 different regression models (it is basically the same regression with the same variables, just different years) and plot the coefficents using plot_coefs. In the plot, however, coefficents are only displayed for the first 12 of the 15…
1
vote
1 answer

Matlab fminsearch Error : Unable to perform assignment because the size of the left side is 1-by-1 and the size of the right side is 72-by-1

I am trying to do a curve fitting using Matlab fminsearch. Here is what I wrote : Idata = readtable('Data_batterie.xlsx','Sheet','C(T)','Range','A1:A72'); Idata = table2array(Idata); Tdata =…
Hurrdof
  • 23
  • 5