instruction
stringlengths
9
38.7k
Here is my multiple linear regression code where $Xtrain$ and $Xtest$ are matrices containing respectively the train and test samples in rows and explanatory variables in columns, and $ytrain$ and $ytest$ are the output column vectors containing the response variable values respectively for the train and test samples. ...
I have a situation where I have to calculate a mean in a group of N=80. But 7 participants have a score of the measured variable <3. It's a medial measure and I don't have the exact numeric value for the measure; I just know it's lower than 3. How can I calculate the mean in this situation? I can't eliminate the parti...
I edited this question to a (hopefully) less confusing structure. The full R code is still available at the end of the post. My problem is a bad fit of the parameter n to my data. I will try to shortly explain the steps I have already taken on solving the problem. My question is, do you suggest that this function I am ...
Scale model: $x\sim \frac{1}{\theta} f(\frac{x}{\theta})$. How can I prove that $\pi(\theta)\propto \frac{1}{\theta}$ is also a Jeffreys prior? I was trying to somehow change variables, using a log-transformation, but I don't seem to get it right. Any help would be appreciated.
I'm following the Tensorflow mnist tutorial (https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/mnist/mnist_softmax.py). The tutorial uses tf.train.Optimizer.minimize (specifically tf.train.GradientDescentOptimizer). I don't see any arguments being passed in anywhere to define gradients....
If I have, for example, a dataset with 30 variables, 25 numerical and 5 categorical. I need to explain (predict) 3 categorical variables and 2 numerical variables from that dataset (let's call it "target") with the following considerations: Some variables only explain the "target 1" and others explain the "target 2" r...
I want to run a time series regression where I regress stock returns on each other. Clearly, the time series for stocks are typically not stationary, however, the returns are (I also tested that). I was wondering whether it is necessary to test the time series for cointegration since - as far as I know - cointegration ...
In the first lecture of Prof. Hinton coursera course (artificial neural networks for machine learning), he says that logistic activation function is probably the commonest activations function. But in deeplearningbook.org they say that "most neural networks today are based on ReLU". Which one is true? ReLU is the first...
I came across a paper on predicting performance metrics for Facebook posts. The dataset is available on this Link In that the authors make the statement below: We adopted the Shapiro–Wilk test to assess if each of the output columns for the features to be predicted followed a normal distribution. Such a validation...
I have a question about the use of fixed versus random effects models. Let us consider the following example for motivation: Suppose we are interested in the relationship between the performance of students on tests and their study time. We randomly select 99 students at a University and record the study time and score...
Sorry in advance for this question. Probably is not meant to be here. If it is not, please point me in the right direction. This is going to be very generic and probably opinion-based. However, I don't know who else to ask. I am not a data scientist, or statistical trained person. I am a developer that has been tasked...
Suppose I have a time series: $$ z_t = 0.01 t + 0.9 z_{t-1} + e_t $$ where $e_t$ is $N(0,1)$. Now, this series is non-stationary as can be easily be checked with an ADF test (using statsmodels for example). My question is, if ADF tells me the that series is non-stationary, can I find the reason it is non-stationary?...
It is known that $(x,y)\in \mathbb{R}^2 \mapsto \min(x,y)$ is a positive definite kernel. Can we generalize this result in the following way : Let $X$ be any set and $f,g:X\longrightarrow \mathbb{R}^{+}$ be non-negative functions. Is $$k:(x,y)\in X^2 \mapsto \min(f(x)g(y),f(y)g(x))$$ a positive definite kernel ? I tr...
I'm interested in clinical trial simulation. Consider a trial where group n receives placebo and group m receives treatment. From the literature, I take the relationship $$ \frac{n \cdot m}{n + m} = \frac{(z_{1-\alpha/2} + z_{1-\beta})^2}{(\delta/\sigma)^2} $$ where n and m are the number of participants in the groups,...
I'm familiar with real-valued time series' stationarity, but what does it mean for $X_{t}$, a categorical-valued time series, to be stationary? Edit: an example of $X_{t}$ is the reduction of daily rainfall volumes to a binary series of 'd' and 'w' for dry and wet.
I'm trying to understand my lecture notes but am a bit stuck on the concept of identifiability. In one-way ANOVA, could someone please explain the reason for the constraint $\sum_{i=1}^{m} \beta_{j} = 0$ where we have m groups of observations, each group consisting of k observations with $Y_{ij}$ as the jth observation...
Is there a parametric joint distribution such that $X$ and $Y$ are both uniform on $[0, 1]$ (i.e. a copula) and $\mathbb{E}[Y | X = x]$ is linear (by which I mean affine) in $x$? That is, $$\mathbb{E}[Y \;|\; X = x] = a + b\,x$$ while $X$ and $Y$ are each marginally $\text{Uniform}[0, 1]$. Of course I could let $X$ an...
I'm working with a dataset where the dependent variable is continuos (sale price of houses) and there a couple dozen features I'm using to predict the sale price using a linear regression model. These features include binary dummy variables, categorical, and continuous variables - all on different scales. The dependen...
I have been using Iris data for a classification problem in SPSS. The Box's M-test is used to check the assumption whether all co-variance matrices are equal or not. Now since the p.value for Iris data is equal to 0.000<0.05 criteria which is set by default in SPSS is it possible to still evaluate the LDA problem using...
Let $x\sim N(\mu,\sigma^2)$ and $\mu\sim N(\xi, \tau^2)$. To test whether $\mu<0$ or $\mu>0$, in Bayesian inference it's usual to take the perspective of hypothesis testing as model selection. In that perspective, $M_1:\mu<0$ and $M_2:\mu>0$ . There are at least two ways to compute $P(M_{True}=M_1|x)$. The easy one see...
I have some temperature data gathered over the course of a few days which follow a cyclic pattern. I've fit a linear regression model to it with sine and cosine waves of multiple periods and the result is very close to what it should be. My question is the following: the model produces a cyclic wave which matches the p...
Given $$ Y_t = \sum_i \omega_{i,t} \cdot X_{i,t} $$ We can decompose the change in $Y$ from period $t$ to $t + 1$ into: $$ \begin{align} Y_{t + 1} - Y_t &= \left( \sum_i \omega_{i,t + 1} X_{i, t + 1} - \sum_i \omega_{i,t} X_{i, t} \right) + \left( \sum_i \omega_{i,t} X_{i, t + 1} - \sum_i \omega_{i,t} X_{i, t + 1...
I've completed multiple imputation of my dataset for the first time using the mice package in R. I'm familiar with the procedure for using the MatchIt package for propensity score matching using a normal dataframe. However, I'm not at all familiar with how to manipulate the mids object which mice outputs after imputati...
I have a dataset of Geese body masses in two locations over a 100 day study period. I am interested in examining how mean body mass changes over study period and if there is a difference between the two locations. To do this, I want to run an Analysis of Co-variance with Mass as the response variable, day as a continuo...
I am having trouble conceptualizing normalizing versus controlling for variables and would appreciate some education on the matter. For example, you want to do a regression with two variables: Hunger, which is how long you have gone without food. Working Memory, which is your score on a test of working memory. You ...
Can anyone explain why "classic" tests of forecast accuracy, (i.e. Diebold-Mariano test, Meese-Rogoff test and Morgan-Granger-Newbold test) are not suited for nested models? I could not find a good explanation in literature.
I am having trouble knowing: (1) The proper statistical test to run on my data, and (2) The proper way to run this test in Matlab. I have 2 experimental groups: a control and a treatment group. Each group is tested over multiple weeks (we have 1 measurement/week). This google doc has an example simulated dataset and a...
I am attempting to test for a significant pattern in a reduction of prescribing drug A and an increase in the prescription of Drug B. I have proportions of patients started on drug A vs. drug B vs. neither for many consecutive years. Time is my independent variable and the proportion is my dependent variable. Is there...
Given a multivariate time series, which method could be applied to segment it into partitions of stationary signals. To give more context: I am given a set of acceleration signals in XYZ-Direction. Based on these signals, I have to map a segment of the signal to a behaviour. The test-signals are not segmented. So ...
Say I have some data about preferred ice cream flavour from a sample of about 500 people. I've taken their ages as well as their preferred flavour - vanilla (coded 0), licorice (coded 1) and chocolate (coded 2). If age is broken into 12 categories of 5 years each (from 18-22, 23-27, etc), the tabulated frequency data...
I will make my question more obvious here. My data consists of each students making 5 attempts to say, throw a ball in a hole back to back. My interest is to see, how many times they succeed, whether the average speed of throwing differs between passed and failed attempts. So I will also have the measurement on the spe...
I wanted to rephrase an earlier question to try and be less vague. I'm essentially looking for help understanding basic Bayesian inference. Let's say I want to predict the transfer rate of a high school in its first year of existence. To do this I feel like the ideal set up would be looking at it from a Bayesian perspe...
I want to understand details of Random-forest algorithm. For this I want to be able to code the Random-forest trees from scratch, does anybody know a good source for the beginners ?
Let's say I have 20 different datasets, some of which are as small as 200 data items and some have around 2000 samples. The goal of analysis is to do some sort of performance comparison between the models working on each dataset. Now say for the smaller datasets I've gone with the LOOCV for performance estimation but...
I am currently working with survey data, and there are multiple questions in the survey that act as a measure of poverty. One question asks how often the individual has had electricity in their residence, another is how much running water and there are about 5 other such questions, each measured on a scale 1 to 5 wher...
I have a function $y=sin(x)$ I sample the points $ x_i=\{0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1\}$ and $$ y_i=sin(x_i) + \epsilon \ \ \epsilon \sim iid\ Normal$$ Now given only the set $\{x_i,y_i\}$ I want to uncover the underlying functional form $f(x)$ given as $$y=f(x)+\epsilon \ \ \ \ \epsilon \sim iid\ Normal $...
To put my question into context, I am a physicist but with limited exposure to statistics and what I have learned about it was over 30 years ago. I am trying to learn about block bootstrapping as that technique might be suitable for solving an issue I am working on. I can find lots of papers/books/info on the mathemat...
In the photo above is the exercise I have to solve. I am in my first year at Statistics and the explanations we are given are lacking many things. I know the autocorrelation function is $p_{k} = \large \frac{ \gamma_{k}(Y_{t})}{ \gamma_0(Y_{t})}$. I replace $Y_{t}$ in the equation above with $X_{t}-X_{t-1}$ but I am s...
I am working with American Census PUMS microdata, a yearly sample that includes a total weight per record and 80 replicate weights. I'm unsure if it makes sense to do descriptive statistics such as histograms, etc, using the unweighted data. Yet, if I'm to use the weights, I'm not sure how to account for the weights wh...
How does principal component analysis (PCA) model data of admittedly higher dimensionality with just a few principal components?
If the number of clear days in June each year is modelled as a (truncated) Poisson random variable, and the chance of seeing a shooting star observed on a clear day is modelled as a Bernoulli random variable, what sort of random variable describes the total number of days shooting stars are observed in June? So I think...
I am using the GLM to model my data. The response variable is binary and there are two predictors, namely, speed (cm/s) and position (cm). First of all I have used the Zernic basis functions to model the position, hence instead of just one predictor as a position, I have bunch of basis functions which the GLM is going ...
I'm training a fully connected neural network using stochastic gradient descent (SGD). In the following graph I've ploted the training error (in the y axis) vs the epochs (in the x axis). As error function I've used the sum of squared errors $\sum_{i=0}^{N}(y - f(x_i))^2$. After running the training several times, I've...
I have a dataset {$X_i$, $Y_i$}. $Y_i$ - real value targets, they can be negative. The task is to teach classifier $f: X_i \rightarrow \{0, 1\}$ to maximize the sum below $$ L(f) = \sum_i f(X_i) * Y_i $$ So $f(X_i) = I[Y_i > 0]$ would be the ideal classifier. I'm looking for appropriate smooth loss function to teach N...
I was able to use the following equation to find derivatives of matrix function: $f(X+h) = f(X) + Ah + o(|h|) \quad \cdots (1)$ where $h$ is small displacement and $A$ is the jacobian matrix. I found couple more equations that find derivatives of matrix function: $D_Yf(X) = \lim_{t->0} \frac{f(X+tY) - f(X)}{t} \quad ...
I have a problem pertaining practical real-life situation we encounter quite often. Lets say I have a e-commerce site selling clothes. There is a particular shirt which was sent N units to the warehouse and let's say few of them were bought online. SO here are the questions: 1). What would be the estimate of future ...
I am dealing with a multi-dimensional problem for which i have marginal information (chi-squared distribution) together with an idea of dependence. When is this question well–posed?
Thanks in advance for the help. Suppose I have an algorithm that may terminate in one of $N$ states. This algorithm operates by running $M$ steps. Each step $m_i, i \in \mathbb{N}^+$, has a probability of succeeding that is independent of other steps. In order for the algorithm to run successfully, all steps must be...
I'm reading a online book titled Mathematical Statistics Old School which can be found here. In the section about the Dirichlet Distribution (which begins on page 63 if you would like to look) it says to let $X_1, \ldots, X_K$ be independent random variables, where $X_k \sim Gamma(\alpha_k, 1)$. Then the $K-1$ vector ...
This may be a trivial question but I want to consult with you all. Let U be a continuous random variable taking values int he interval [0,2pi]. Let X = cos(U), Y = sin(U). Determine the Pearson correlation between X and Y. How to calculate the E[XY]?
I'm interested to know if there is a method for comparing the performance of two different models, such as a linear model and a linear mixed effect model on the same data set? I'm interested to compare these two statistical models and comment on their suitability for interpreting the data. Any suggestions would be grea...
In each of the below 2 code snippets, for 20 times, I generate an input matrix $X$ containing 1000 variables and 50 samples, and and an output vector $y$ which is generated from $X$ using a multivariate linear model. And my aim is to perform leave-one-out cross-validation on this data, so predict the response $y$ for e...
I am working on textual dataset containing data from official documents like reports by companies, legal documents, speeches by directors to shareholders etc. The content of textual documents are like: In respect of its fixed assets: a. The Company has maintained proper records showing full particulars including ...
I have the following data but not sure about the best way to visualize it. Average assignment scores for the users starting to participate in the first, second, third, and so on, days of the course. Assign1 | Assign2 | Assign3 | Assign4 | Assign5 | Assign6 day-1-participants 15 | 20 | 8 ...
It's often quoted that for an N-dimensional Gaussian-like target distribution, the ideal acceptance ratio is 0.23 (if your proposal distribution is also Gaussian). Assuming we use a gaussian proposal distribution with a diagonal covariance matrix, what would the above correspond to in $\sigma_i$ (the tuning length or ...
I could not understand and don't see how the author derived equation (16). The Covariance is with respect to a pdf $\mu_k$ for the random vector $u$. The variable $\xi$ is a ratio of two densities and is equal to $ \frac{\mu_{k+1}}{\mu_k}$, both $\mu_{k+1}$ and $\mu_k$ are densities from the exponential family. The fun...
Sum of squared error can be used to evaluate the model and compare them to see which one is lower, however this evaluation metric is sensitive to number of observations used. Coming to $R^2$, this is robust evaluation metric as it is not sensitive to number of observations. The question I have here is, sum of squared ...
I cannot get my head around a statistics issue. So I have run a test with 10 participants as a basic short memory test. It was found that the mean difference in correct answers to the test between before and after treatment was 2.4 with a standard deviation of 0.8. My null hypothesis is that the difference in the wide...
I am trying to understand of designing the network architecture in "fully convolutional networks for semantic segmentation", J Long; and "learning deconvolution network for semantic segmentation" H Noh. In the FCN-32s the last layers are pool5(22x22x512)--conv(7x7x512)-->fc6(16x16x4096)--conv(1x1x4096)-->fc7(16x16x409...
I have a numerical code which, given an input vector $\mathbf{x}$ and parameter vector $\boldsymbol{\theta}$, gives me an output $l=f(\mathbf{x},\boldsymbol{\theta})$. I assume the statistical model $y=f(\mathbf{x},\boldsymbol{\theta})+\epsilon$ where $\epsilon\sim\mathcal{N}(0,\sigma)$. I have a random sample $D=\{\ma...
When modelling survival data one usually starts with a Kaplan-Meier curve and uses then Cox regression for machine learning. I am wondering if I could use also more sophisticated methods as models such as neural networks or support vector regressors etc to model the survival data? Let's say I am interested in predictin...
I'm handling surgical times: operating room time, time to do certain procedure, among others. As you might guess, sometimes (hopefully rarely) surgeries have complications and thus aggravate immensely some of these surgical times, which then translates into a very rare but very extreme value (like - median 40 minutes, ...
While looking at properties of MLE, the articel mentions 4 things below: sufficiency (complete information about the parameter of interest contained in its MLE estimator) consistency efficiency parameterization invariance (same MLE solution obtained independent of the parametrization used) Somehow, I have got the i...
My understanding is that to carry out a multilevel (model, a rule of thumb is that around 12 level 2 units, or groups, is needed. Is this a helpful rule of thumb, without additional information? What is this based on? What considerations, technical and otherwise, should be considered? I searched, and this doesn't seem...
Background: The cross-correlation function, wrapped in frequency domain convolution, is used in particle image velocimetry to allow sub-pixel metrology. It is also used in convolutional neural networks and deep learning, and has this feature: it is translation invariant. It is not rotation invariant. It is not ske...
Background: I'm designing an experiment where I have a sequence X of operations for which I want to measure a property (i.e., the overall performance of the sequence). I'd like some input from you to check whether my experimental design is sound. Since the measurement of the property might be affected by external facto...
For example, the data could be: App A, 100-500 downloads, 20 mins App B, 100-500 downloads, 75 mins App C, 500-1000 downloads, 30 mins and so on. I want the overall correlation as well as app-wise distinction (if possible). What kind of plot should I use?
I'd like to conduct an augmented dickey fuller test to test my time series for unit root (against the alternative hypothesis of stationarity). Until now I did the following test: summary(ur.df(na.omit(ApplStock),type = c("drift"), selectlags = c("AIC"))) and get this result: ###########################################...
Here's my question: Let's say I'm looking at smoking (categories smoker, ex-smoker, never smoked) and risk of death (binary dead, not dead). I have a follow-up of 5 years. What happens if someone becomes an ex-smoker 3 years into the study? Do they become effectively censored from the point at which they became an ex-...
I am making a naive logistic regression implementation to better understand how it works. I am using a very simple dataset provided by Andrew Ng's course on Coursera (pastebin link with the rest of the code). Weirdly enough, the model seems to be getting progressively worst instead of better. For example, in the last ...
Dataset: Rows are cross validation sets and columns are different regression methods. The dataset contains RMS error values on a benchmark regression problem. So, lower is better. Here is a boxplot of the data. Methods 9, 10, 11 and 12 are visually much better than others. I want to identify the methods that are signi...
I thought this was going to be trivial, but it seems I was wrong. I have 2 datasets which are metrics of dendrogram congruence. I currently have them formatted as matrices as I have made heatmaps from them. What I want to do is get the correlation between the various metrics I'm comparing, do determine how robust the m...
Let's say I have balls numbered 1 to 100 in an urn. Every time I pick one at a random, record it as seen and put it back in the urn. How many such picking do I have to perform if I expect to see at least 99 of them? I am looking for a general solution to such problems, not just answer to this specific problem. (please ...
I'm trying to implement the SVM+, an SVM variant that uses privileged information $x^*$ at training time but predicts based only on the regular training data $x$: Here $K(x_i, x_j)$ and $K^*(x_i^*, x_j^*)$ are kernels in $X$ and $X^*$ spaces that define inner products in $Z$ and $Z^*$ spaces and $\alpha, \beta$ are th...
I'm trying to make a minimum Mahalanobis distance classifier. I have two groups of data. The goal is to take one of the datasets in either group, calculate the Mahalanobis distance from both of the groups' means. The group with the smallest distance is the one that the dataset belongs to. Details about what the data i...
I'm interested in comparing the result of two experiments. These experiments measure the completion time of a process. My problem is that these completion times are highly variable, and it's not always possible to run an experiment to completion. To make it concrete, here is the type of data I get when repeating an exp...
I am trying to figure out how to run/analyze a block randomized experiment in the following situation, and to figure out how much of an improvement I would get over simple random sampling: Suppose I have an email list of 30 people (10 adults and 20 children). I want to do an A/B test where I send two different emails a...
I'm trying to understand (esp. the boldfaced part) how THIS ARTICLE (see p. 174, top-right corner) is suggesting that: "to use the confidence intervals to test a statistical hypothesis and to maintain a Type I error rate at alpha: When testing a two-sided hypothesis at the alpha level, use a 100(1 - alpha)% confidenc...
Consider that I have a matrix: r1 = rand(365,5); which represents the air temperature observed at a number (5) of stations in a country (each row is a day of year and each column is a different air temperature station). Thus, in this example I have one-year of data for 5 air temperature stations. I now want to add so...
I try to model species abundance data using the gbm.step function in R by Elith et al. 2008. In this function you have to choose a family aka loss function. There are several options: "gaussian" (for minimizing squared error) "laplace" (for minimizing absolute loss) "bernoulli" (logistic regression for 0-1 out-co...
I found the following problem in the book The Theory of Probability: Explorations and Applications by Santosh S. Venkatesh. Consider the sample space comprised of all $k!$ permutations of the symbols $a_1,...,a_k$, together with the sequences of $k$ symbols obtained by repeating a given symbol $k$ times. Assign to...
I'm currently working to develop a model which predict a traveler's choice of transportation mode (transit, auto, bike, walk) using data from the U.S. Census which has been aggregated to custom origin/destination zones. Thus, the data available to me is not traveler specific but instead contains variables representing ...
The Poisson model is probably the first that pops into mind when trying to model count data, which is generally described as: non-negative integer data. The Poisson distribution is defined as modeling the number of counts which occur in a specific time interval. My question is: What if I model non-negative integer data...
When using a smoothing method for a linear model such as Ridge Regression. It is usual to choose the regularization parameter $\lambda$ as the one that minimizes the cross validation error. However this criterion is focused on minimizing prediction error for new observations. I understand that the amount of regulariza...
I am implanting my first NN and I want to use cross validation. I have diposoted 20% of my data aside for testing and the rest is my training set. I have divided my training set to 10 sections and I am iterating over them 10 times, each time picking another section to test a model trained on the other 9 sections. I ha...
For my honors thesis, I am trying to determine what coyotes eat using isotope statistical mixing models. They can eat wild animals (deer, rabbits, etc.) or domestic animals (sheep, cattle, etc.). I have 5 isotope values each (carbon, nitrogen, oxygen, sulfur, hydrogen) for 10 different wild animals and 10 different dom...
Can anyone give some examples of widely-used kernels between sets of vectors? A kernel between sets of vectors is a positive semidefinite map $k:(S,T)\mapsto k(S,T)\in \mathbb{R}$ where $S$ and $T$ are sets of vectors (i.e., $S=\{s_1,s_2,\ldots,s_m\}$, $T=\{t_1,t_2,\ldots,t_n\}$, and $s_i,t_j\in \mathbb{R}^d$. Thank yo...
Suppose I have some data (say 200 rows/instances and 20 columns/features) and got clustering results like this. At high level we can say there are two clusters, my question is that How can I tell what's are differences between these two clusters, e.g., what feature or combinations of feature make the two branches?
I have been tasked with designing an RCT and although I am familiar with the general principles of randomized block designs, I wanted to hunt down a good reference that could take me through the process step-by-step. Specific questions: 1) How do I determine the optimum block size? 2) What are the pros and cons of a ...
I was originally trying to find evidence for a simple interaction effect in a Poisson regression model. However, after reading this paper by Dawson (2014) I realized that I might be in the presence of quadratic effects moderated by one variable. When I tested for a curvilinear relationship between Y and X11, moderated ...
I am running multilevel mixed-effects logistic regression analyses and for some of the random effects parameters it reports very large standard errors relative to the estimate, and in some cases it does not report confidence intervals at all. Why might the analyses report results like these, and should I be concerned? ...
I am trying to understand the mathematics behind estimating the covariance matrix for a set of observations with missing data entries (or NaN). I would like to do this without deleting rows with missing entries or without using post-hoc smoothing to ensure that the covariance matrix is positive semi-definite. How migh...
I have run a mixed effects model with a ln transformed continuous response (seconds) and found a significant effect of the categorical predictor (treatment/control, the only fixed effect in the model). I want to: 1- Report an effect size (cohen's d, etc) 2- Describe the magnitude of the effect in terms of mean number ...
I'm a newbie in Time Series Analyses. I'm using ARIMA to make a prediction about my monthly data. So sorry that I cannot post my data here, you can just dump the data to use for example. I use auto.arima() to build my model and forecast to predict. Both functions are loaded from forecast library. From my understanding,...
Algorithm 1) Step 1:Obtain a sample $y$ from distribution $Y$ and a sample $u$ from $(0,1)$ Step 2: Check whether or not $u < f(y)/ M.g(y)$ if true accept $y$ as a sample from $f$ Else, reject the value of $y$ return to the sampling step Algorithm 2) There are model parameters $\theta$ described by a prior $\pi(...
I want to look at whether a promotion the year prior has an effect on performance rating in the following year. I have been struggling with how to model this in R using the lme4 package. The data looks like this: > str(dataset) 'data.frame': 227163 obs. of 4 variables: $ Employee : chr "33816" "34863" "34863"...
Here is a keras code sample that uses it: from keras.constraints import max_norm model.add(Convolution2D(32, 3, 3, input_shape=(3, 32, 32), border_mode='same', activation='relu', kernel_constraint=max_norm(3)))
How would one infer the number of people that took a test based on the percentages of people that got particular questions correctly. For example 1. 85% 2. 25% 3. 95% 4. 15% 5. 35% $ n = 20 $ A caveat is that these percentages actually come with some noise, therefore you cannot be sure that something like 35.6% is 8...
Faraway (1998) stated that ANN model is refitting 50 times from different random starting points and taking the best of resulting minima. Can anyone explain the Faraway statement.
This bootstrap primer from Stanford says How many observations should we resample? A good suggestion is the original sample size. While I get that this advice might be referring specifically to the study example in that guide, is it "a good suggestion" in general? Under what circumstances might be more appropriate ...