24k views

The main difference imho is that while "classical" forms of linear, or generalized linear, models assume a fixed linear or some other parametric form of the relationship between the dependent variable ...

36k views

lmer is used to fit linear mixed-effect models, so it assumes that the residual error has a Gaussian distribution. If your dependent variable A is a binary outcome (e.g. a yes/no response), then the ...

8k views
The expected value of a random variable $X\sim\cal N\left( {1,3} \right)$ is 1. However, as noted by Dilip Sarwate in his comment, your pdf is wrong: there should be no was wrong, there was an extra $... View answer 1 answers 2 votes 707 views Accepted answer 6 votes To obtain the function$f(x) = \theta x^{\theta - 1}$you need to use rbeta( , 2, 1), not rbeta( , 1, 2) (to see why look into ?rbeta). density_fun &lt;- function(x,theta=2){ theta * x^(theta-1) } ... View answer 1 answers 6 votes 223 views Accepted answer 6 votes Your fit2 does not really fit a random slope. Instead, it sets a random intercept for each combination of Days and Subject. This implies that for the computation of the random effects fit2 treats Days ... View answer 4 answers 6 votes 24k views 6 votes Within an artificial neural network, a neuron is a mathematical function that model the functioning of a biological neuron. Typically, a neuron compute the weighted average of its input, and this sum ... View answer 3 answers 6 votes 287 views 5 votes No (no such thing as infinite probability: a certain event has probability 1). In fact if it is a probability of an event (and not of a continuous random variable) then it is an ill-posed problem: ... View answer 1 answers 0 votes 49 views 4 votes The exact interpretation depends on how the predictor variables are coded. Recall that the logistic GLM can be expressed as $$\log_e \left(\frac{p}{1-p} \right)=\beta_0 + \beta_1x_1+ \ldots+\beta_n ... View answer 1 answers 2 votes 37 views Accepted answer 4 votes If you have only 2 predictors, e.g. y=\beta_0 + \beta_1x_1 + \beta_2x_2+\epsilon, then yes it could be represented as a sort of surface, although note that you might have multiple values of y for ... View answer 1 answers 1 votes 114 views Accepted answer 4 votes Given that your observations are clustered according to individual participants, which can be considered random samples from a population distribution, the best and most robust approach is provided by ... View answer 1 answers 2 votes 2k views 4 votes I think the way you formulated the model is a bit misleading: you have Site as grouping factor (i.e., there are random intercepts contingent on which site you are measuring), but then you add it also ... View answer 1 answers 1 votes 71 views 4 votes Pearson's r correlation coefficient is computed as the covariance of two variables, divided by the product of their standard deviations. It is bounded between -1 and 1.$$ r_{x,y}=\frac{\text{cov}(x,... View answer 1 answers 0 votes 51 views Accepted answer 3 votes I think the reason is mainly conventional: If you plot FPR against TPR you obtain the same curve, except that is concave upward instead of downward, and the conventional summary statistics change ... View answer 3 answers 1 votes 19k views 3 votes The formula$x' = \frac{x - \min{x}}{\max{x} - \min{x}}$will normalize the values in$[0,1]$. I am not sure of why you want to exclude$0$and$1$, anyway one way would be to choose a new minimum ... View answer 1 answers 1 votes 116 views Accepted answer 3 votes You are not doing anything wrong as far as I can tell. I think the problem is that your integrand is approximately zero almost everywhere except for a small range around 50. From ?integrate If the ... View answer 2 answers 4 votes 4k views 3 votes The high AIC value is not a problem in itself: the AIC is a measure of the relative quality of a model; it says something about how good is the fit of a model but only with respect to another model ... View answer 1 answers 0 votes 122 views 3 votes The output gives you the shape and rate parameter of the gamma distribution; you can find on Wikipedia the formula for the shape-rate parametrization. To plot the probability density function you can ... View answer 2 answers 6 votes 3k views Accepted answer 3 votes The maximal structure would need to include also a random effect for the interaction between color and shape, that is: Y ~ color * shape + (color + shape + color:shape | subject) This will result in ... View answer 3 answers 1 votes 628 views 3 votes If you know the formula of the response to a single pulse/peak, you could do a deconvolution of the observed response. You could use the approach described in this article http://www.pnas.org/content/... View answer 1 answers 0 votes 66 views 2 votes If you want to give a confidence margin on the estimates, your approach of estimating the standard deviation of the errors,$\sigma$, and then giving a confidence interval of$2\sigma$is sound; ... View answer 1 answers 1 votes 53 views 2 votes Perhaps this could be addressed using a beta-binomial model? You could have a predictor that code for possible changes in the underlying (unknown) fraction of people with the disease in the population ... View answer 1 answers 1 votes 152 views 2 votes I think you may be confused about some concepts: The effect size is a (standardized) measure of the magnitude of the phenomenon that you are investigating - in other words, it is a property of the ... View answer 2 answers 2 votes 171 views Accepted answer 2 votes I think the model you want in lme4 syntax should be written as lmer( R ~ c + Manufacturer + c:Manufacturer + ( c | sensor), data = data) This model will have sensor-specific random intercept and ... View answer 1 answers 6 votes 538 views Accepted answer 2 votes I think in this case it is recommended to do a parametric bootstrap: the mixed effect model gives you an estimate of the variance of the effects of words and subjects, so you can generate new random ... View answer 1 answers 2 votes 293 views Accepted answer 2 votes Both answers are correct. The likelihood is defined as $$p \left(Y \mid X=1 \right) = \frac{1}{\sqrt{2\pi}}\, e^{\frac{-\left(y-1 \right)^2}{2}}$$ Assuming both$X=1$and$X=-1$have the same ... View answer 1 answers 2 votes 454 views Accepted answer 2 votes Since the mean of the simulated residuals is not exactly zero, the model cannot possibly disentangle the mean residual from the true effect. Nevertheless, the model clearly does a good job in taking ... View answer 1 answers 1 votes 1k views Accepted answer 2 votes The mixture model (for a continuous response variable) has the following density function $$p(x)= \frac{p_{guess}}{2\pi} + (1-p_{guess}) \frac{e^{k \cos (x-\mu)}}{2\pi I_0(k)}$$ To fit this model to ... View answer 1 answers 1 votes 314 views Accepted answer 2 votes You have a model of the form $$y = a + b\left( {\frac{{x - {\mu _x}}}{{{\sigma _x}}}} \right)$$ And need the parameters of this equivalent model $$y = c + dx$$ ($\mu_x$and$\sigma_x$are the mean ... View answer 2 answers 2 votes 4k views 2 votes The first delta value outputted by cv.glm is the mean squared error between your dependent variable Sex (dummy coded as 0 and 1 values) and the predicted probability that Sex$=1\$, averaged over the ...