I am trying to perform regression analysis of plotted points with the generalized additive model gam () using R, which is statistical software.
I applied it to my dataset using gam (), a function that can reproduce the generalized additive model in R, but the result of the execution is only linear (y = ax + b) no matter how many times it is executed. , I can't approximate the curve I want to do.
The name of the text data of the dataset to be used is dataset1, and the data is plotted with ΔZ on the vertical axis and I on the horizontal axis.
In my dataset, the horizontal axis (I) is discrete data, and each value of the data takes an integer value from 1 to 14. On the other hand, it is possible that taking continuous values on the vertical axis (ΔZ) may not match the algorithm of the generalized additive model well, but I have no knowledge about that and my powerlessness. I am keenly aware ... If i know anything, please let me know.
What I tried
library (mgcv) gam.model<-gam (ΔZ ~ s (I), data = dataset1) plot (gam.model, residuals = T, se = T, pch = ".", "main = result of leveling spline", cex.main = 2)
I have made a plot, but I haven't tried anything else because I don't understand why the curve approximation is not done (it becomes a linear approximation).Supplementary information (FW/tool version, etc.)
The PC used is a Macbook Pro.
The version of R is 4.0.3.
Answer # 1
The gam model will be considered even if it is linear. So, in this case, it's not that something is wrong, it seems that it is not wrong in the interpretation that the alignment was suitable for the regression analysis result. Thank you very much.
- the self-made function of multiple regression analysis does not work well
- Python linear regression analysis model test standard-detailed explanation of goodness of fit
- numpy - i get an error in regression analysis in python
- python - regression analysis using sckit learn how to select the optimal combination of features
- python 3x - i want to perform regression analysis using linearregression please tell me about the input data
- adjusting logistic regression curves
- how to set branch of regression tree (decision tree) using partykit (i want to make it vertical)
- about the normality of the residual of regression analysis
- i want to write a regression equation, coefficient of determination, p value, etc in a scatter plot in r's ggplot2
- python multiple regression analysis statsmodelsformula
- python - regression analysis with statsmodels cannot resolve the error that it contains infinity or nan
- logistic regression analysis in python
- python - i get an error when i try to do a simple regression analysis using sklearn
- python 3x - i want to make a scatter plot of the results of regression analysis
- i want to turn the regression equation, but it doesn't
- Example analysis of simple linear regression algorithm implemented in Python
- i want to clarify how to calculate the confidence interval of the success probability with r glm
- how to determine the sample size
- i get a numeric list error in fitdist
- will the r language be replaced by python in the future?
- python - similarity between sets with child sets
- php standard deviation cannot be calculated correctly
- python - how to output statistics skills
- calculation method of principal component load in principal component analysis by statsmodels