Skip to main content
Filter by
Sorted by
Tagged with
1 vote
1 answer
128 views

I’m trying to fit a logistic function to GDP data (China GDP dataset) using scipy.optimize.curve_fit. The fitting looks very good (R² ≈ 0.99, curve matches the data), but when I try to predict a ...
MSo's user avatar
  • 13
2 votes
1 answer
72 views

I have some parameters: A1, A2, A3, f1, f2, f3. These parameters are then used to generate a set of sinusoidal data, something like: y = A1 * sin(f1 * x) + A2 * sin(f2 * x) + A3 * sin(f3 * x) From ...
PentaGeer Joshua Meetsma's user avatar
2 votes
0 answers
101 views

I wrote a symbolic regression tool in Python. It is possible to give unary and binary operators. If nothing is specified, I want to determine potential operators. So, I want to know if there is an ...
P'tit Ju's user avatar
  • 143
1 vote
0 answers
62 views

I have found a script for generating a polynomial regression, which I have adapted to my needs and which basically works. However, in order to be able to use the script the way I want to, I need a ...
Mike's user avatar
  • 11
0 votes
1 answer
66 views

I have following example data The Figures depend on 3 parameters: X, Y & Rank. Out of these we are making 4 buckets. High X High Y, Low X Low Y, High X, Low Y and Low X, High Y. Then we are ...
Jack Mank's user avatar
2 votes
1 answer
73 views

I am plotting a nonlinear generalized additive model (gam) using R's mgcv package: library(mgcv) V <- rep(1, nrow(dt) fit <- gam(cbind(V, group_number) ~ s(time_elapsed, exposure_group, bs='fs'...
Stefan Verweij's user avatar
0 votes
1 answer
71 views

I feel like I'm missing something really obvious here. I'm using the R package DLNM to fit a model. It's happening inside a function (not shown) so that I can feed in different datasets and change the ...
jdcode's user avatar
  • 147
5 votes
1 answer
259 views

I'm working with a very large dataset containing CWD (Cumulative Water Deficit) and EVI (Enhanced Vegetation Index) measurements across different landcover types. The current code uses LOESS ...
Shunrei's user avatar
  • 339
0 votes
1 answer
97 views

I am trying to emulate an nls() fit with nls2() via brute-force, when nls() works, so that I can look to a second option when it doesn't. What am I doing wrong in how I have specified nls2() below? Is ...
LucaS's user avatar
  • 1,335
3 votes
2 answers
113 views

I am doing some pharmacokinetic analyses and am fine with non-compartmental methods. But I trying to also learn some non-linear curve-fitting techniques. If we have the following data: df <- data....
LucaS's user avatar
  • 1,335
0 votes
1 answer
112 views

I have written visual basic code to determine the r square when fitting data using different order polynomials: Linear 2nd order polynomial 3rd order polynomial As an example, I have used the ...
Daniel Louw's user avatar
0 votes
0 answers
62 views

I want to estimate (the Greek characters are coefficients to be estimated): where D_{it}^d are dummy variables (=0 or 1), and {\theta_i}_i,delta are to be estimated. i can be large, so there are a ...
Nameless's user avatar
  • 165
2 votes
1 answer
162 views

I was trying to fit a data set into a sinusoidal function with the code below: data = importdata('analisipicco.txt') ; x = data(:,1) ; y = data(:,2) ; yu = max(y); yl = min(y); yr = (yu-yl); ...
Jack_01's user avatar
  • 39
-1 votes
1 answer
64 views

I am trying to use Python to calculate mean absolute error (MAE) while doing zero-inflated Poisson regression and zero-inflated negative binomial regression. I separated data into training data and ...
Student coding's user avatar
0 votes
1 answer
103 views

I'm wondering if there is a non-linear regression routine with scikit-learn which allows for incremental learning, ie though the partial_fit call. I see that SGDRegressor and ...
zazizoma's user avatar
  • 567
0 votes
1 answer
150 views

I have two groups of data and reason to believe that they follow the same asymptotic curve with offset upper limits. All the observations are assumed to be independent. I fit a simple model with the ...
myfatson's user avatar
  • 561
3 votes
2 answers
198 views

Similar to the post here: How to plot multiple `nls` fit curves with `geom_smooth()` (getting model parameters in the function call) I want to plot a nonlinear regression output from nls with ggplot2 ...
myfatson's user avatar
  • 561
0 votes
1 answer
139 views

I'm trying to fit modeling data as a curve using Scipy's optimize curve_fit to some scattered data, but I got a negative value of (bX) parameter that makes no sense. So I'm not sure what is wrong with ...
yusra zabarmawi's user avatar
0 votes
0 answers
60 views

import numpy as np import pandas as pd from sklearn.linear_model import LinearRegression from matplotlib import pyplot as plt from sklearn.model_selection import train_test_split from sklearn....
Jit Roy's user avatar
0 votes
1 answer
60 views

I am trying to understand what the following snippet of the code does, in particular the assign(home=1).rename part: goal_model_data = pd.concat([epl[['HomeTeam','AwayTeam','HomeGoals']].assign(home=1)...
Astral's user avatar
  • 209
3 votes
2 answers
227 views

I'm trying to use bam() and method="fREML" to speed up my analyses. require(mgcv) require(gratia) require(brms) require(DHARMa) require(marginaleffects) mode11 <- bam(Met1 ~ s(Timepoint, ...
Adam9's user avatar
  • 55
0 votes
0 answers
81 views

I want to plot my data into a plt.scatter form but when I try to fill it, it just says that the x and y are not of the same size, and I also squeezed them to only one dimension so that it is easier to ...
Bernardo Géo Cometto's user avatar
0 votes
0 answers
234 views

I am working with nest success data. Nests are either successful (1) or not (0), depending on whether or not a nest produces at least 1 hatchling. Because this is binomial data, I am running glmmer ...
Sofie's user avatar
  • 1
0 votes
0 answers
97 views

I am not an expert with non-linear regression, but I struggle to make it work. I would like to fit the polynomial f(x) = ax^3 + bx^2 + cx + d, with the following constraints on my parameters : I want ...
Vincent's user avatar
  • 309
0 votes
0 answers
815 views

Screenshot demonstrating the use of Excel's Solver: I have a task to automate a certain excel worksheet. The worksheet happens to implement a logic with an excel plugin called Solver. It uses a ...
user1763824's user avatar
1 vote
0 answers
117 views

I'm trying to get bootstrapped confidence intervals for parameter estimates of a non-linear (Gompertz) mixed effects model built in the lme4 package with function nlmer(). I need to be able to graph ...
ef2's user avatar
  • 11
0 votes
0 answers
55 views

I have a non-linear model that I fit in brms: mod <- bf(y~(I*N*X^b)/(A+k*B), I ~ 1, b ~ 1, k~1+(1|group), nl = T, ...
Julien Beaulieu's user avatar
0 votes
1 answer
111 views

I run the example included in the documentation of the nardl function in the nardl package ############################################ # Fit the nonlinear cointegrating autoregressive distributed lag ...
Jose Luis Iparraguirre D'Elia's user avatar
0 votes
1 answer
152 views

using System; using System.Collections.Generic; using MathNet.Numerics.LinearAlgebra; using MathNet.Numerics.LinearAlgebra.Double; using MathNet.Numerics.Optimization; namespace ...
user366312's user avatar
  • 17.5k
0 votes
0 answers
44 views

A multiple regression with number of days from start of observations gives me a plot in which the confidence limits are shown for the entire range of x-values of the curve. When I change the ticks and ...
Roger Frost's user avatar
2 votes
1 answer
1k views

I am trying to use MathNet library to compute curve fitting based on nonlinear regression. using System; using System.Linq; using MathNet.Numerics; using MathNet.Numerics.LinearAlgebra; using MathNet....
user366312's user avatar
  • 17.5k
1 vote
1 answer
142 views

I would like to conduct multivariate regressions analyses of survey data with the item count technique using ictreg but without success as I keep seeing the following error message "Error in ...
Nick's user avatar
  • 11
2 votes
1 answer
2k views

I am fitting a piecewise linear mixed regression in R. I know that I can use lme from the nlme package followed by segmented to perform piecewise linear mixed regression. However, upon reading the ...
amedicalenthusiast's user avatar
0 votes
1 answer
368 views

I fitted a non-linear model to a dataset. However, I need to perform the half-normal plot of this model (using the hnp() function from the hnp package). My model was fitted considering the nls() ...
user55546's user avatar
0 votes
0 answers
135 views

I am trying to do a linear regression which takes some physical measurements and then predicts various Physical values. One of these Physical values is a complex number, so I am trying to split it ...
Sam's user avatar
  • 11
1 vote
0 answers
799 views

I'm trying to run an ordinal logistic regression to predict an ordinal variable with 8 categories (bins of # of days spent recreating) based on a categorical (BIPOC/not) and continuous (urbanicity ...
KL_47's user avatar
  • 31
0 votes
0 answers
177 views

I am estimating a diff-in-diff simple model with an interaction term consisting of the product between a dummy of treatment status (treat) and a dummy of post-treatment time period (pos). The ...
PaulaSpinola's user avatar
0 votes
0 answers
58 views

I am new in optimization and would like to write code that will determine the values of a1, a2, b1, b2 for a predefined function f_model based on the available inputs X1_data X2_data and output Y_list....
CLW-II's user avatar
  • 1
0 votes
0 answers
77 views

So, I'm trying to test a hypothesis for a rank, nonparametric regression that none of the measured variables contributed significantly to the determination of the total triglyceride level. So, my ...
Jonah Douglass's user avatar
0 votes
0 answers
55 views

For context, I have calculated 3 functional diversity indices from the potentially non-affected fraction (PNAF) of species at different dissolved oxygen concentrations. In order to fit a regression I ...
William Imart's user avatar
0 votes
1 answer
95 views

I am trying to model data as a normal curve in R. I am using the form of the equation: Below is the code for calculation of equation parameters: filtered_sp14 <- c(549.778714, 259.835892, 992....
fre1990's user avatar
  • 177
0 votes
0 answers
41 views

%use fitobject = fit([x,y],z,fitType)creates a surface fit to the data in vectors x, y, and z. fitobject = fit([t,omega_0],z,fitType); fittype('A*cos(omega_0*t+phi)','problem',{'A','phi'},'options',fo)...
NirvanicUniverse's user avatar
0 votes
1 answer
159 views

I have created a data set to understand better an equation and apply it to predict behavior. The equation is y = 10/(1+k*⌊((x/t)^s)⌋). To create the data set and see if it is working properly, I did ...
Juan Pablo Molano Gallardo's user avatar
0 votes
1 answer
117 views

I'm trying to fit some non-linear models in shiny to identify the best parameter values and then use them as initial values. As an example, I'm using a non-linear logistic model. Below is the ...
user55546's user avatar
2 votes
1 answer
998 views

I have a dataset of 10 subjects, whose muscle response amplitude was measured across 11 different stimulus intensities (states) applied to their muscles. The output curve of the data looks like a ...
A.R.'s user avatar
  • 55
1 vote
1 answer
914 views

I'm trying to fit ELISA plate data to a non-linear mixed effect model, using the nlme function. Previously, I asked about how to make the syntax work for nested groups, though responses made it seem ...
AndyH's user avatar
  • 11
0 votes
2 answers
434 views

I've been trying to apply cluster-robust standard errors in my calculation of the marginal effects of two predictor variables (main effects and their interaction) in a ZINB model. The code works ...
Nate Phillips's user avatar
1 vote
1 answer
77 views

I am trying to fit non-linear models with brms. My model is: y = intercept + b1 * (x1 * mean(x2^b2)) where: x1 is a measured continuous variable, x2 is also a continuous variable nested in x1. For ...
Julien Beaulieu's user avatar
0 votes
1 answer
57 views

I am learning to fit a tree taper mixed model using R. So I would like to know how can I add random effects in the model? Let's say we fit the model using variable-exponent taper funtion of Kozak (...
Thanapol CHOOCHUEN's user avatar
0 votes
0 answers
453 views

The crux of my problem (as far as I can tell) is that no examples are out there that give the proper syntax for nested groups when coding the groups argument of nlme. All examples only give a single ...
AndyH's user avatar
  • 11

1
2 3 4 5
16