about statistical-calculators.site
Paste data below. For X variables, use space, tab, or comma as delimiters. Check the boxes if your pasted data includes a header row. Rows with any missing values will be removed (listwise deletion).
Menu navigation instructions:
Interface instructions:
Interface instructions:
Code example:
# Sample dataset creation data <- data.frame( y = c(12, 15, 18, 20, 25), x1 = c(2, 3, 5, 7, 8), x2 = c(10, 11, 9, 12, 15) ) # Fit multiple linear regression model model <- lm(y ~ x1 + x2, data = data) # Display regression summary and statistics summary(model)
Code example (using statsmodels for detailed statistical summary):
import pandas as pd
import statsmodels.api as sm
# Sample dataset creation
df = pd.DataFrame({
'y': [12, 15, 18, 20, 25],
'x1': [2, 3, 5, 7, 8],
'x2': [10, 11, 9, 12, 15]
})
# Define predictor matrix and add intercept constant
X = df[['x1', 'x2']]
X = sm.add_constant(X)
y = df['y']
# Fit Ordinary Least Squares (OLS) model and output summary
model = sm.OLS(y, X).fit()
print(model.summary())