All Questions
22
questions
1
vote
1
answer
160
views
How to use the argument stype in boot-package in R? [closed]
The stype argument in boot of R can take 3 values: "i" which is the default, "w" or "f".
What is ...
1
vote
2
answers
71
views
which non parametric test to use? friedman or Kruskal?
I am conducting a study on textrual complexity. We fed people food (3 types) over 3 sessions and asked questions about hunger levels. 20 participants were tested during 60 trials in total. Of the 14 ...
1
vote
0
answers
140
views
how well would a robust mixed model fit these data? R (rlmer)
I want to investigate Y ~ X1 * X2 + (1|ID on this dataset (there's a plot of these data in that post too, it's the same dataframe)
Y is a continuos outcome ...
3
votes
1
answer
1k
views
How to interpret coefficients from rank based regression (Rfit package in R)?
I need to examine the relationship between an outcome variable (continuous) and a number of predictors. Since my data is non-normally distributed (i.e. the residuals from the multiple linear ...
2
votes
1
answer
561
views
Creating a custom distribution with flexsurvreg
I'm interested in fitting a parametric survival model but would like to explore the use of a Beta distribution for this purpose rather than a Weibull, Exponential, etc. model.
The Beta distribution ...
5
votes
0
answers
4k
views
How to better understand when to use Weibull AFT versus Cox Model for Failure Data
I am struggling to understand when I should consider using a Cox regression model versus using a Weibull AFT model to predict the end of life of mechanical components.
I have tried to apply the Cox ...
2
votes
0
answers
25
views
Contribution of a predictor in Nonparametric regression
Is there an equivalent to a beta weights in a nonparametric regression?
I am using the NP package in R and running a local linear regression where my bandwidth estimates are produced using least ...
4
votes
1
answer
2k
views
Construct piece-wise linear mixed effect models
I'm looking at the BMACS dataset(data(BMACS)), and is trying to construct a local constant fit without covariates using base functions B1(t) = 1 for t < 2, B2(t) = 1 for 2 <=t <4 and B3(t) = ...
4
votes
0
answers
2k
views
How does the gam library calculate AIC?
I was wondering how the gam library calculates the AIC. I can't find a reference that explains how this package calculates it.
...
6
votes
1
answer
2k
views
Surface Fit Using Tensor Product of B-Splines
I am trying to teach myself surface fitting with splines using tensor products. I am trying to construct a toy example but I can't seem to get my example to work. I will try to explain the best I can ....
2
votes
1
answer
3k
views
Local polynomial regression with Epanechnikov kernel
I am trying to do local polynomial regression in R. The model I wish to fit has a single explanatory variable and a single response, it should have a bandwidth of 5, and a polynomial degree of 3.
I ...
3
votes
0
answers
2k
views
parametric bootstrap on regression
I keep trying to perform parametric bootstrap on simple regression analysis to grasp the concept. The internet is full of tutorials on non-parametric one, but I found no explanation or steps ...
8
votes
2
answers
4k
views
Limitations to generalized additive model (GAM)
I don't quite understand the generalized additive model behind the GAM package in R. It seems quite powerful with the ability to easily find complex relationships and confidence intervals for these as ...
8
votes
1
answer
2k
views
How exactly is the sum (or mean) centering constraint for splines (also w.r.t. gam from mgcv) done?
The data-generating-process is: $y = \text{sin}\Big(x+I(d=0)\Big) + \text{sin}\Big(x+4*I(d=1)\Big) + I(d=0)z^2 + 3I(d=1)z^2 + \mathbb{N}\left(0,1\right)$
Let $x,z$ be a sequence from $-4$ to $4$ of ...
2
votes
0
answers
126
views
How does the cubic spline basis exactly look like
By the definition
(1) $S(x)=\begin{cases}
S_0 = a_0x^3 + b_0x^2 + c_0x + d_0, & \text{if }t_0\le x\le t_1\\
.....\\
S_{k} = a_kx^3 + b_kx^2 + c_kx + d_k, & \text{if }t_{k-1}\le x\le ...