1
R / mgcv:为什么te()和ti()张量积产生不同的曲面?
的mgcv软件包R具有两个功能,用于拟合张量积相互作用:te()和ti()。我了解两者之间的基本分工(拟合非线性交互与将这种交互分解为主要效果和交互)。我不明白的是为什么te(x1, x2)而ti(x1) + ti(x2) + ti(x1, x2)可能产生(略)不同的结果。 MWE(改编自?ti): require(mgcv) test1 <- function(x,z,sx=0.3,sz=0.4) { x <- x*20 (pi**sx*sz)*(1.2*exp(-(x-0.2)^2/sx^2-(z-0.3)^2/sz^2)+ 0.8*exp(-(x-0.7)^2/sx^2-(z-0.8)^2/sz^2)) } n <- 500 x <- runif(n)/20;z <- runif(n); xs <- seq(0,1,length=30)/20;zs <- seq(0,1,length=30) pr <- data.frame(x=rep(xs,30),z=rep(zs,rep(30,30))) truth <- matrix(test1(pr$x,pr$z),30,30) f <- test1(x,z) y <- f + rnorm(n)*0.2 par(mfrow = c(2,2)) # …
11
r
gam
mgcv
conditional-probability
mixed-model
references
bayesian
estimation
conditional-probability
machine-learning
optimization
gradient-descent
r
hypothesis-testing
wilcoxon-mann-whitney
time-series
bayesian
inference
change-point
time-series
anova
repeated-measures
statistical-significance
bayesian
contingency-tables
regression
prediction
quantiles
classification
auc
k-means
scikit-learn
regression
spatial
circular-statistics
t-test
effect-size
cohens-d
r
cross-validation
feature-selection
caret
machine-learning
modeling
python
optimization
frequentist
correlation
sample-size
normalization
group-differences
heteroscedasticity
independence
generalized-least-squares
lme4-nlme
references
mcmc
metropolis-hastings
optimization
r
logistic
feature-selection
separation
clustering
k-means
normal-distribution
gaussian-mixture
kullback-leibler
java
spark-mllib
data-visualization
categorical-data
barplot
hypothesis-testing
statistical-significance
chi-squared
type-i-and-ii-errors
pca
scikit-learn
conditional-expectation
statistical-significance
meta-analysis
intuition
r
time-series
multivariate-analysis
garch
machine-learning
classification
data-mining
missing-data
cart
regression
cross-validation
matrix-decomposition
categorical-data
repeated-measures
chi-squared
assumptions
contingency-tables
prediction
binary-data
trend
test-for-trend
matrix-inverse
anova
categorical-data
regression-coefficients
standard-error
r
distributions
exponential
interarrival-time
copula
log-likelihood
time-series
forecasting
prediction-interval
mean
standard-error
meta-analysis
meta-regression
network-meta-analysis
systematic-review
normal-distribution
multiple-regression
generalized-linear-model
poisson-distribution
poisson-regression
r
sas
cohens-kappa