instruction
stringlengths
9
38.7k
I am looking for a library routine that will calculate the lag 1 autocorrelation of a time series with a rolling window; meaning "slide a window of size N points along the time series, calculate the lag 1 autocorrelation for each window." I have implemented an algorithm inspired by Wikipedia but would like something to...
I ran an ordinal logistic regression in R using the polr function on a survey analysis dataset. The responses of the dependent variable range from Poor to Excellent. The responses to the independent variables range from 1 to 5 (1 being Poor and 5 being Excellent). I obtained the following result: I want to measure the...
I've been redirected here from another forum... I have used a two sample Kolmogorov-Smirnov test to compare the distributions of two sets of data. Basically I am comparing the error distributions between two measurements when an intervention is made, to determine whether the intervention (a changing measurement parame...
I'm using a multinomial logistic regression analysis to examine deer behavioural responses to camera traps in terms of 7 predictors (both singly and their interactions). I have found that the model with the lowest AIC value is season and vegetation (AIC = 1005.023). However, the AIC value for season as predictor varia...
A couple of years ago I learned about recent work in parallelizing slice sampling methods. More recently, I have read great things about NUTS and Hamiltonian Monte Carlo methods (HMC) in general (e.g. pymc3 uses NUTS) This makes me wonder: What are NUTS and HMC particularly good for? Can they benefit from paralleliza...
here are distributions of four samples: and the following is the table of data: I would like to test: (1) if the difference between means of "Give" and "Work-Give" samples is significant; and (2) whether the difference between means of "Take" and "Work-Take" samples is significant. As you can see, distribution of the ...
I wrote a simple function in Python to calculate the exponentially weighted mean: def test(): x = [1,2,3,4,5] alpha = 0.98 s_old = x[0] for i in range(1, len(x)): s = alpha * x[i] + (1- alpha) * s_old s_old = s return s However, how can I calculate the corresponding SD?
I have data of patients of a large hospital with columns representing different mental and physical illnesses and patients constituting the rows. The data are in binary form (1 = patient has disease; 0 = patient does not have the disease). I want to test, given a certain mental disease, whether there are significant d...
Let $X \sim \textrm{Beta–Binomial}(\alpha_1, \beta_1, n)$ and $Y \sim \textrm{Beta–Binomial}(\alpha_2, \beta_2, n)$ and write $\mu_1 = \frac{\alpha_1}{\alpha_1 + \beta_1}$, $\phi_1 = \alpha_1 +\beta_1$, $\mu_2 = \frac{\alpha_2}{\alpha_2 + \beta_2}$, $\phi_2 = \alpha_2 +\beta_2$ for brevity. I have some samples $x_1, x_...
As I know from experience, the parametric bootstrap performs better in terms of coverage probability for confidence intervals then the empirical bootstrap. Of course, this makes sense because you put in some information about the distribution and that is used to reduce the error. However, thats not really a mathematica...
I ran an ordered logit difference-in-difference estimation and got stuck in terms of interpretation. The dependent variable takes on values 1 2 and 3 and I am trying to obtain coefficients for the variables for each of the three categories as I see in papers but I am not sure how to go about it.
Does anyone know of a tool that I can use to generate a set of data with known correlations (and to put the icing on the cake - output this in json,csv,txt or some common format)? I am working on some data visualizations and want to evaluate which ones can more easily allow a user to spot correlations - visually.
I'm trying to teach myself how to quickly translate many different types of equations into VB, T-SQL and MDX code. Since I'm trying to build a skill, not just solve a single isolated problem, I'm try to figure this stuff out on my own as much as possible - but I'm stumped by the error function used in the calculation o...
I have a simulation where an animal is placed in a hostile environment and timed to see how long it can survive using some approach to survival. There are three approaches it can use to survive. I ran 300 simulations of the animal using each survival approach. All simulations take place in the same environment but ther...
I heard and read several times of the use of 'binning' methods to estimate the uncertainty and the auto-correlation time of a sample generated by MCMC but I can't find a textbook example of it being explained and applied. Could anyone share it with me?
I'm teaching myself to translate equations to code after many years of letting my math skills atrophy, and am trying to do it on my own as much as possible. I've run into a couple of difficult equations though that I just can't solve without a few pointers though, particularly the one for Mahalanobis distances mentione...
I am trying to estimate health care costs and I was wondering what the standard practice is for extreme values? By extreme values I mean I have a large portion of my costs being zero and a small portion of my costs exceeding $\$100,000$. In this case is it better to use a mean the median? And what is the justification...
I know the main concepts of data/text mining but I used them mainly in binary classification problems (just two classes). I am now dealing with a problem with 8 classes and struggling to calculate an evaluation metric, like precision, recall etc. Can I convert a multi-class confusion matrix to a binary confusion matrix...
I need to analyse if there's a difference between poor and rich European countries (using a GDP per capita index variable) and look if it has an effect on the variable environment. The GDP per capita variable is a ratio variable going from 44-..., while the environment variable is a nominal variable with two categories...
I have a variance-covariance matrix, $\mathrm{V}$. This allows me to take a vector, $x$ of independent random variables drawn from a known distribution, and induce a required variance-covariance structure to give a correlated random variable $y$ from: $y = \mathrm{V}^{\frac{1}{2}} x$ Because $\mathrm{V}$ is positive d...
I am interested in a general question about research design, but I will explain it on a specific example. Suppose I want to determine if one group of people has higher heart rate than the other group. Let's consider two methods to do that, two scenarios: Scenario 1: we get one measurement of heart rate from 5 people i...
This is my model adapted from a study. I want to know whether I can only study it as a path analysis without studying mediation effect (1 $\longrightarrow$ 5 direct effect, as well as indirect effect) by just checking effect of one variable effect on another? I am using amos for this purpose. All paths are significant...
I am conducting a two-sample test (1-way ANOVA with 2 treatments), and the goal is to estimate the ratio of cell means assuming that the data are lognormal. A simple approach is to log the response and fit a model $\log Y = b_0 + b_1 * X$ and then estimate the ratio as $R = e^{b_1}$ However, that gives the ratio of ge...
I have a problem embracing the benefits of labeling a model factor as random for a few reasons. To me it appears like in almost all cases the optimal solution is to treat all of the factors as fixed. First, the distinction of fixed vs random is quite arbitrary. The standard explanation is that, if one is interested in ...
I am trying to analyze a dataset in which there are three measures on patients within areal units, however I am having trouble in how I am thinking about random/fixed effects and including covariates at different levels of the model. Dataset Dependent variable: Presence of disease (1=Yes, 0=No) Independent variables:...
I am fitting a single exponential decay formula with three parameters (a,b,c): y ~ $a \exp(-xb) + c$ using the LAD cost function: $ \min \sum |(y - f(x))| $. $x$ is in units of time (as is $b$), and $a$, $c$ are unitless. Measurements are taken far enough out in time that the last $y$ is effectively only noise from mea...
I ran a big Neural Network with the initialized weight matrix learned by RBM (Restricted Boltzmann Machine), and the result shows something like this. On train dataset The best precision: 0.79564. And the best recall: 0.75685. The best f1: 0.775760 On test dataset The best precision: 0.7356. And the best recall...
This is the most widely used method for outlier detection in econometrics and statistical problems. X is our data that we're searching for outliers in it (in MATLAB) : abs(X-mean(X)) >= n*std(X) So if this inequality was true, that sample is an outlier; otherwise we will keep the sample. I'm using neural network and ...
I have read about the fact that, there is dependency of variance on mean of count data.In most of cases they do variance stabilization transfomration as preprocessing step of data modeling. I wonder, why variance depends on mean in count based data ? in other word, which properties of count data make this happen ?
I want to calculate the mean and standard error of the mean for the amount spent per person visiting a store. Most people don't buy anything, so the distribution looks like this ${\rm P}({\rm purchased},{\rm spend}) = {\rm P}({\rm purchased}) {\space} {\rm P}({\rm spend} | {\rm purchased})$ where purchased and spend ...
I just fitted the following linear mixed effects model: Linear mixed model fit by maximum likelihood ['lmerMod'] Formula: price ~ variable + (1 | product) Data: podzbior AIC BIC logLik deviance df.resid 130840.14 130868.85 -65416.07 130832.14 9674 Scaled residuals: Min 1Q M...
Assume that I want to predict the value of a variable that has three different states: a, b, and c. The chance that these variables have the 3 states is not equally distributed. Out of 10 trials, the distribution is like this: a: 2 b: 3 c: 5 If I have a random predictor that randomly predicts whether the variable is a,...
I'm new to this forum and I'm quite new to forecasting. Currently I'm trying to learn the basics about exponential smoothing, ARIMA etc. Now I want to forecast the total energy consumption of a rather small company at the end of the month. You can see a typical power load profile for a full week in this image. The con...
Let $Z=(Y, X)$ be an observation from a distribution $P$ where $Y$ is a response variable and $X$ is a vector of regressors. Assuming the following model: $Y = F(X'\beta, u)$ where $X'\beta$ is a linear index, $u$ is a random disturbance ($u \perp X$) and $F$ is a strictly increasing function in each of its arguments. ...
In the first step of modeling a regression equation I came up with the following model: $T_c = 26.73 + 0.042{\rm Sc} + 0.247{\rm Lc} - 14.709{\rm Lf} + 1.41{\rm Lu} - 0.214{\rm Fc} + 0.041{\rm Ad} - 64.308{\rm Sr} - 20.341{\rm Rc}$ Analyzing the residuals it is obviously noticed it does not follow a normal distribution...
If I have several hundred coefficients generated by running multiple variable regression model (keeping it as broad as possible by not specifying the nature of the predictors and outcome variable), it would appear to me that I have two options for assessing the significance of any one result. Identify the largest stan...
I have two time series which are sampled at the exact same times. I would like to calculate a confidence interval either for the ratio between the two or the difference between the two. The values tend to be somewhat similar, but both have a large amount of what looks like random noise superimposed on them (much larg...
Can anyone give the intuition behind of the relationship between these two? I see a lot of proofs in books, but no real intuition. Thanks
The deviance information criterion (DIC) is a very popular tool for Bayesian model selection, due, in part, to its support by the BUGS platforms. However, there are some remaining limitations as discussed by Plummer (2008). One of these is that "the effective number of parameters, pD, must be small in relation to the s...
Suppose we have a random sample from a bivariate normal distribution which has zeroes as means and ones as variances, so the only unknown parameter is the covariance. What is the MLE of the covariance? I know it should be something like $\frac{1}{n} \sum_{j=1}^{n}x_j y_j$ but how do we know this?
I'm reading the lecture notes of a course in statistics and I found the next: The moment generating function is defined as $$M_X(t)=E(e^{tX})$$ Check that : $$M^{(n)}_X(t)=E(X^n) $$ Any idea where the last result is coming from? For example if I try to do this for say a random variable with a binomial distribution I do...
After trying several models with my data, R^2 and p values are showing my model looks like below. ACF plot tells me AR term is significant. Insights into data tells me change in 'x' would have impact(say y is A/C usage and x is temperature). y(t)=a+b*y(t-1)+c*{x(t)-x(t-1)}+error Question: Is the above model statisti...
I got asked this question today: How could we reasonably safely conclude that, for a given dataset, in practice, one classifier generalizes better than another? I could not give a concise answer, and thought maybe you guys would like to chip in. I understand obviously that there is still much in terms of research in...
I was reading Andrew Ng's CS229 lecture notes (page 12) about justifying squared loss risk as a means of estimating regressions parameters. Andres explains that we first need to assume that the target function $y^{(i)}$ can be written as: $$ y^{(i)} = \theta^Tx^{(i)} + \epsilon^{(i)}$$ where $e^{(i)}$ is the error term...
I have to conduct an experiment getting data from a system. These data are the estimated values, provided by the system, of a true value that we know beforehand. I then compare the estimated values with the true value to analyse how accurate the estimations of the system are. In this context, we have a set of estimated...
I am studying the correlation between a set of input variables and a response variable, price. These are all in time series. 1) Is it necessary that I smooth out the curve where the input variable is cyclical (autoregressive)? If so, how? 2) Once a correlation is established, I would like to quantify exactly how the in...
I have a computer science background but am trying to teach myself data science by solving problems on the internet. I have been working on this problem for the last couple of weeks (approx 900 rows and 10 features). I was initially using logistic regression but now I have switched to random forests. When I run my ran...
I understand probability distribution but I am having a hard time getting a grasp on probability density function, specifically difference between dexp (density of exponential distribution) and pexp (probability distribution of exponential distribution)
I have been working on seed germination experiments with some dormancy breaking treatments and only for some treatments only I got germination. I need to analyze the parameters like days for initial germination and days for final germination. since I got germination for only few treatments and for others no germination...
I need a goodness of fit test for the exponential distribution. I understand that Kolmogorov-Smirnov is not generally regarded as very powerful and that Anderson-Darling is regarded as superior. However I have two problems. None of the literature I can find specifically talks about goodness of fit for exponential dis...
I have been struggling to fit the following problem into a linear state space model for a Kalman Filter (KF). I'm having a hard time seeing what I'm doing wrong. I suspect I'm violating some law of KF state space modeling. Perhaps something is non-gaussian, non-linear, non-kosher? I have data from players who score poi...
This is a quite simple question but I don't find any good, clear, precise answers: I'm looking for a way to perform post hoc test on a chi$^2$ test. I have 2 variables : var1 : good/fair/poor and var2: a/b/c This is the contingency table : a b c good 120 70 13 fair 230 130 26 poor 84 83 18 with R : mat <- ...
I run k-means clustering on my dataset (100 samples in total) and partition the data into k=5 clusters. Then I want to test how robust of the k-means can be; however, I haven't got more new data samples. My idea is: Take the first sample out and run k-means on the rest of 99 samples. Loop over the step described above...
I have a 2x2 contingency table and i want to calculate if the pair inside is significantly different. i made a matrix like the following named raw_matrix CNS random Not_H3K4 343 28825 H3K4 11 2014 Create this matrix , thus: raw_matrix = structure(c(343, 11, 28825, 2014), .Dim = c(2L, 2L), .Dim...
I have a model that I fit on two different samples (each representing a region in a country, with different sample sizes): region 1: P = a1 + a2*H region 2: P = b1 + b2*H which is simply: region 1: R1 <- lm(P ~ H) region 2: R2 <- lm(P ~ H) To test for equality of coefficient estimates, a Wald test would be appropri...
Suppose I have this MA(1) model: $y_t = \mu + \epsilon_t + \theta \epsilon_{t-1}$ with $\epsilon_t \sim \mathcal{N}(0,\sigma^2)$ The marginal distribution of $y_t$ for all $t$ is $\mathcal{N}(\mu,\sigma^2(1 + \theta^2))$ but the classical theory says that since the $y_t$ variables are not independent, the likelihoo...
I have two groups of subjects, both undergoing two experimental conditions. During the experimental conditions, the subjects take questionnaires for evaluation of the mood states, and blood pressure is measured at the same time. I want to obtain the correlation between blood pressure and the mood ratings, with simulta...
I'm using Stanford CoreNLP's dependency parser, and wondering how to make a generic search for SemanticEdge(s) with specific head lemma, dependent lemma, and lexical relationship. For example, if I have an actual dependency like this: dobj(discover-4, insights-6) How do I search for it using lemmas instead of the lit...
I have a system / operator repeated measures data set for which I would like to answer the questions: is system 1 quicker than system 2 is operator 1 quicker than operator 2 does the order of using the systems matter So I've hopefully understood the problem correctly to be a "system vs. operator with interactions" qu...
I am trying to analyse the effect of hidden unit saturation (outputting mostly 0 and 1 for sigmoid, and not much in-between) on the neural network training performance, and I feel a bit stuck, theory-wise: who says saturation is necessarily a bad thing? The idea is that a saturated unit can not differentiate much betwe...
I am doing a study on 3 drugs, comparing response pre-post treatment. My objective is to know if these drugs are effective and which one is better. I used non parametric tests since the results weren't normally distributed and were non transformable. Two drugs were effective with a significant difference on the Wilcoxo...
I have an experiment which has 2 treatment groups (effects) and a control group. Up until this point in my analysis, I've been carrying out a DID using a regression equation of the form: $$Y= γD_t + β_1(TREAT_1) + β_2(TREAT_2)+ τ_1(TREAT_1D) + τ_2(TREAT_2D) + ε$$ Basically I've been including both treatment effects in ...
How can I take the cumulative sum of a 2D distribution, starting from the highest value in the distribution? Background: my 2D distribution is the probability of different combinations of wave heights and wave periods based on measurements made at an ocean site. Assume the distribution shows that the most common wave (...
In this paper, the authors defined uncorrelatedness in the following way: Let $\mathbf{X}=(X_1,...,X_n)$, and $\mathbf{Y}=(Y_1,...,Y_n)$, where $X_i\sim X$ and $Y_i\sim Y$. $\mathbf{X},\mathbf{Y}$ are uncorrelated iff $(\mathbf{X}-\bar{X}\mathbf{1})'(\mathbf{Y}-\bar{Y}\mathbf{1})=0$, where $\bar{X}=1/n \sum X_i$ and $\...
Let' say I have a regression model: $y=a+b*x+error$ Suppose $x$ is income and $y$ is consumption. The hypothesis is that higher income leads to higher consumption and hence, the coefficient on $x$ should be positive, other things remaining the same.Let's also say the estimated coefficient is 0.60. This model obviously...
I'm trying to understand the difference between testing the null hypothesis (i.e. testing that the probability of a "goal" is the same across 2 different populations, similar to prop.test in R) an A/B test using a bayesian formula such as described here: http://www.evanmiller.org/bayesian-ab-testing.html Is there a...
I have recently performed a GMM estimations, my problem is that all the J-stats are 0.0000. It means that the IV are overrefined right or the model is not well specified. I used one-period lags of the independent variables as interments. Should I just report that the GMM model is misspecified or even if the J stat is 0...
I have a statistical question about a project I recently got. We performed a flow cytometry assay on 3 different groups: controls (n=5), patients before treatment (n=5) and paired patients after treatment (n=5). My plan would be to compare the median expression of the same cell population in controls and patients befor...
I have a questions regarding a statistical analysis of a biologic experiment. In the experiment I have collected imaging data on the duration of contacts between immune cells. We have compared two distinct types of immune cells and their contact time with a third cell type. The duration of contacts was measured in minu...
I have a data set containing two variables x and y. I want to estimate the parameters for a regression model. The regression model is: The maximum likelihood function that estimates the parameters is: Here is a link to the data set: http://www.filedropper.com/data_14 Is there a way to estimate the parameters of this...
The question is best illustrated by this example which uses a dataset (in library faraway) and lme4 library (both in R). This intercept-only model is only for illustrative purposes. library(lme4) library(faraway) data(epilepsy) log(mean(epilepsy$seizures)) #expected intercept in intercept onl...
This is a very simple question posed to me by a friend of mine. I know it's a statistical analysis problem, but I suck at math. Given the total population of $x$ within a metropolitan area, what would be the formula to determine approximately how many single heterosexual men or women there are between age($\min$) and a...
I have a simple question for you, which has to do with style. Since I am a novice in writing research papers, I have the small issue of not knowing how to represent an equation in an acceptable way. I am running an OLS regression, for which I use year fixed effects. Since I do not wish to write up every b*year-dummy co...
I am wondering what the most common way to handle data is wherein a participant belongs to multiple groups. For example, if you're wanting to run linear regression and look at how specific diet-type (IV/predictor) effects a specific health outcome (DV/response variable) and you have a few participants that are on a com...
I need to do a number of regressions in SPSS but keep getting error messages. For example - "There are X cells (i.e., dependent variable levels by combinations of predictor variable values) with zero frequencies." and "The log-likelihood value is practically zero. There may be a complete separation in the data. The ma...
I'm using the gee() function from the gee package in R. The problem I'm having is that the 'Maximum cluster size' that I get from the output of the GEE function seems to disagree with what I believe it should be given my data. Here's a small example, where I have six observations from each of ten patients, which are m...
Random forests are theoretically funded on the assumption that the data are i.i.d. realizations from a multivariate random vector $(X_1, \ldots, X_p, Y)$. Does it make sense to use random forests (for prediction and for feature selection based on variable importance) when the predictive variables are not i.i.d. from a ...
I have an array of float from wich I calculate the mean and the standard deviation. The user can specify a number of class varying between 2 and 8. The min and max values of each class is calculated by a number of standard deviation above and below the mean. Ex: nbr_classes = 4; mean = 10; min_value = 1 max_value = 10 ...
I want to guarantee a parsimonious random forest (few features used). What are methods to do this? It was suggested to me to get the feature importance after the model was created, and then create a new model using only the important features. Is this a good idea/what other options are there?
I want to determine the 95% confidence interval of a mean. I logged-transformed my data in order to achieve a normal distribution. Several observations contained 0, so I changed these to 1 so that they would be represented as 0 after the transformation. I then found the standard deviation of the log-transformed dat...
In lasso or ridge regression, one has to specify a shrinkage parameter, often called by $\lambda$ or $\alpha$. This value is often chosen via cross validation by checking a bunch of different values on training data and seeing which yields the best e.g. $R^2$ on test data. What is the range of values one should check? ...
I'm kind new into nonlinear mixed model theory and I've seen that you cannot determine expected values of your response variable by simply inserting the estimated parameters into your model equation, because the model is nonlinear in the random components. Why is that? What is the theory behind that? And, what should I...
I am using the Zero-trick to create a prior for correlation parameter. Data y is a bi-variate normal with covariance matrix with same diagonal elements and correlation phi. The covariance matrix is positive definite for |phi| < 1, the usual range for correlation. But instead of common prior phi ~ uniform(-1,1), I am us...
I'd like to know if it is reasonable to use the same set of data to estimate and use a reliability metric from repeated measures? I am mostly interesting by the minimal detectable change (MDC). But I thought that the MDC was a property of a measuring instrument BEFORE using that instrument. Is that wrong? Is it cheati...
Regularized generalized linear mixed models and generalized additive mixed models are exactly what I need. I'm an R user, so it looks like bGAMM and maybe glmmLASSO are possibilities outside of doing my own implementation (which I don't have time to do for this project). My question is whether these packages can handle...
I have a response variable, y.hat, that is an estimate of animal abundance. I know the standard error of y.hat. I'm skeptical of a recommendation to use the uncertainty in y.hat as a weight when I regress or calibrate y.hat to another variable. There are a few parts to consider. First, the standard error of y.hat t...
I'm doing a two-factor within-subject design experiment, and the two factors are all categorical variables. factor one has four categories, while factor two has two categories, and is counterbalanced. this lead to a 2*4=8 conditions. the dependent variable is a continuous variable such as reaction times. my data is in ...
I am trying to set up a generative model where I have two images $x$ and $y$ and it is assumed that $y$ can be generated by applying some unknown transformation to $x$ i.e. $$ y = t(x, w) + e $$ i.e. $$ e = y- t(x, w) $$ where $t$ is the applied transformation which has parameters $w$ and e is the error which is assume...
I use bootstrapping to generate the distribution / histogram of my sample statistic and find out that the value of my real sample statistic is way out in the tail. What does this mean? Does it mean that my sample is unrepresentative of the population? But if it is indeed unrepresentative of the population, then wouldn'...
I think it must have been come through the PDF of a Gaussian distribution. Could somebody elaborate?
I have ten data sets with normal distributions and carrying out significance tests on each one. With this many data sets, there is a good chance that some will be significant by chance. I am going to try the Bonferroni method to solve this problem but another approach that occurred to me is a binomial one. I.e. if the ...
I have a 3 way mixed ANOVA, where I have 2 significant main effects, one significant two way interaction and a significant three way interaction. I've been told to not describe the lower order effects if the three way interaction is significant so I haven't (but have put inferentials in table). After getting the si...
I am confused with the word "draw samples from any probability distribution P(x)", mean I apologize for my ignorance, but, drawing sample as i understand, is for example, tossing a coin and writing whether the outcome was a head or a tail, x1 {1,0}, whether a subject was obese, normal or underweight , x2 {1=Obese, 2=No...
I have a dataframe with the following column: Year, Temperature, Num.Species which are all numeric variables. Each row represent the number of species observed a certain year and the mean temperature that year. I want to test if the regression slope of Year~Temperature, differs from the regression slope of Year~Tempera...
I have come across the term exponential family. The Bernoulli, Gaussian and many more distributions come under this exponential family. What would be the commonalities between them?
I am trying to create a decision-tree out of a number of attributes, where there are only two final classes and the classes are highly unbalanced (Class 1: 95.5%; Class 2: 4.5%). The idea is to profile the members of Class 2. For example, Class 2 members have attribute 1 >= 8, attribute 2 < 6, attribute 3 between 1/1/2...
I would be grateful for general guidance/advice about data analysis with some data that is problematic for me because of the small sample size, and the large number of categorical data. I realize this question is a bit vague, but that's because I'm not sure what to do. I'd like to come up with some good descripive char...
What is difference(Or relation) between "Latent Class Analysis"and Structural Equation models" and "Latent Growth Curve Models"?
I'm wondering what is the estimation techniques used in lm(). If it's OLS, how could we perform a log likelihood test by logLik()? What's the difference between lm() and ols(), mle() and other functions?
Here goes the question from textbook: A small restaurant seats 20 diners, and is full every night. The chef knows from previous experience that 40% of the diners order steaks, so she always has 12 in her fridge at the beginning of the evening. If a customer orders steak, what is the probability that he/she will receive...