instruction
stringlengths
9
38.7k
I have a set of response variables (uptake of product A-C) such as uptake_a uptake_b uptake_c 1 0 1 0 1 0 0 0 0 I would like to recommend product A, B or C based on a set of explanatory variables. To achieve this, I was going to build a logistic regression for each one of the ...
I am trying to build a sequence to sequence model using tensorflow. Tensorflow provides some functions for learning embeddings for words - tf.nn.embedding_lookup and tf.contrib.rnn.EmbeddingWrapper can help with that. The question is, will learning an embedding matrix for the vocabulary be any different than adding an ...
for my thesis, I'm having difficulties on how to analyze my hypothesis. In a nutshell: DV: evaluation of colonial history IV: article (positive or negative description of colonial past) that participants have to read moderator: ideology (on a continuous scale) I'm suspecting a different result depending on whether the ...
I would like to apologize first if my question is not appropriate for the StackExchange. I have data on households' expenditure, socio-economic characteristics, features of dwellings they are living at and a variable which reports duration of stay at current dwelling in integers (0 and more than 0). I thought of Coun...
I have a dataset including several yearly time series of different sites. I have built multivariate random forest model in a leave-one-site out cross validation model using the caret package in R. The model is doing well in predicting my dependent variable, however I am afraid that there is some temporal auto-correlat...
I have variables a1 and a2 with 57 observations each, and variables b1 and b2 with 29 observations each. I compare a1 with a2 by means of a paired-samples t-test, this gives p<0.001. Next, I compare b1 with b2 by means of a paired-samples t-test, this gives p>0.05 (actually p>0.10). I compared the p-values, and conclud...
I'm performing speech intelligibility tests in a cross-over design study. In effect, a paired t-test, or repeated-measures ANOVA analysis is the way to go here, because every subject serves as their own control. Basically, we test every subject in a control condition (C) and in a condition where we have tempered with t...
I was wondering if there is a test for binary data similar to two-way ANOVA. Basically, I have 50 images analyzed by 3 persons using 2 different methods and thus I obtained 6 samples of paired/dependent binary measurements. What test I can use to compare the variation between these? Thanks
I'm following two timeseries: one is a setpoint, the other is the controlled output. When the setpoint rises I want the controlled output to follow quickly; when the setpoint drops, it's acceptable to have the output drop more slowly. Is there a metric that can quantify this behaviour? Some kind of "positive cross-corr...
Is it reasonable? The categorical features can be binary ("true" or "false") or strings, which are one-hot encoded. Some continuous features may be integers, which are treated as real values. If an autoencoder is an appropriate approach for such mixed data, what would be a reasonable loss function? Any other suggestion...
I am aware it is common practice to standardize the features for ridge and lasso regression, however, would it ever be more practical to normalize the features on a (0,1) scale as an alternative to z-score standardization for these regression methods?
I try to use a GoF measure called MAPE mean absolute percentage error, I know there are some related answers that a$model[[1]]-a$residuals is the best way in the the plm package. The problem is I use first differences and lagged variables, length(a$model[[1]]) is 3327 and length(a$residuals) is 2845. Any ideas how I co...
I have fish gene expression data from various contaminated and reference sites. We measured the expression of 4 thyroid hormones in each fish at 5 sites. Site 1 had the fewest fish of only 6. The site with the most fish has data for 20 fish. I'm wondering how to compare the 4 hormones across 5 sites that have unequal s...
I'm training a neural network to classify the MNIST digits. For this, I am using this mnist library which states: It includes 10000 different samples of mnist digits. And: Both sets [training and validation] are shuffled, and there are no samples repeated in both sets. So, what I'm doing is create a 8000 samples tr...
My question is to do with 1) how to identify the best kernel function to use (for instance Epanechnikov, Gaussian, triangle etc) for earnings on formal and informal sector using Stata 2) how do I work out the bandwidth which would bring out the best estimation.
Background I am fitting a dataset of 1500 observations and 375 features (after one hot encoding of categorical features) dealing with prediction of house prices. I am using a gradient boosting model (GBM) using the GradientBoostedRegressor in the sklearn library. I've kept 20% of dataset as holdout set for obtaining a ...
I´ve read this fantastic book The elements of statistical learning and I have a question about the lasso equation for the Lasso problem in its Lagrangian form: $\hat{\beta}_{lasso} = argmin \{ \frac{1}{2} \sum_{i=1}^{N}(y_i -\beta_0 -\sum_{j=1}^{p} x_{ij}\beta_{j})^2 + \lambda \sum_{j=1}^{p} |\beta_j| \}$ I don´t know...
I am trying to implement transfer learning to make predictions on test set using a model trained on another dataset collected from a different sample. For this, I need to identify the subset of training data that has a similar distribution with the test data. I wonder if there are any methods to achieve this in sklearn...
In theory, feed forward neural network should be able to approximate any smooth functions given enough nodes in the hidden layer. In other words, it could significantly overfit the training data set. I was expecting feed forward NNets to fit the training set with a sign accuracy close to 100% without any penalization, ...
I have time series data and want to perform multiple regression. I have three time series independent variables that i want to include in the regression model. Before doing any analysis do I need to remove the trend from all data sets ( dependent and independent variables)?
I have the continuous variable Y and the predictors Pct_less10, Pct_10to20, and Pct_21plus. NOTE: The predictors are basically percentage of people under age category and they add up to 1. So my observation level is Y at the monthly level, and I have covariates as Percentage of people less than 10 years old, percentage...
How can we interpret differences between t test p values and randomization-inference p values? Let’s say we have a randomized experiment with a binary treatment, denoted $Z_i = 1$ if unit $i$ is assigned to treatment, and outcomes, denoted $Y_i$. We want test for a treatment effect. We test both the sharp null hypot...
my experiment is a cross-over randomized trial with 2 conditions (A-B), and repeated measures at baseline and 5 follow-up measurements (time). I hypothesized that 2 physical drills (A-B) would induce different fatigue magnitude. Data were not normally distributed. I've treated my data as independent groups (group perfo...
I am interested in finding the difference of entropy between two states of the same variable. The probability distribution associated with the variable X changes at each discrete point in time t by an increment in p(i). The current state is therefore always an update of the former state as we advance each step along th...
I have run bivariate analysis predicting cholesterol and iron from gender and age. The coefficient of gender is $-0.57$ (male=1, female=0) and the coefficient of age is $0.5$. Now I am wondering how one can interpret these coefficients?
Could someone please explain to me why you need to normalize data when using K nearest neighbors. I've tried to look this up, but I still can't seem to understand it. I found the following link: https://discuss.analyticsvidhya.com/t/why-it-is-necessary-to-normalize-in-knn/2715 But in this explanation, I don't understa...
I'm performing regressions on the relationship between macroeconomic factors and firm survival across industries. I have the real GDP growth rates for each industry and the PRIME rate for the entire United states. This has given me the fixed effects equation: $$ SURVIVAL_i,_t = \alpha_i + \beta_1rgdp_i,_t + \beta_2prim...
Suppose we have a function, $$ F = F(x_1, x_2, ... , x_N) , $$ then one can try to model it with one of the many available techniques, for example, via linear regression: $$ F = \sum_{i=1} ^N c_i x_i $$ But linear regression, as well as any other technique I am aware of assumes that the variables are independent of ea...
I want to solve $$ \min \:\: \vert \vert x \vert \vert_1 \:\:\:\: s.t. \:\: Ax=y $$ using a Neural Network or Recurrent Neural Network. I found only this paper, but there $x$ has to be greater or equal zero. Do you know any other good papers, tutorials or other projects about how to solve this problem using a network?
I am recently working on LASSO for my commercial car usage data. A problem I am facing now is that, I have around 200 factors, 100000 samples. However, quite a few of the factors are very sparse: only 1000-5000 has a value (all the rest are zero) among all these 100000 samples. I am wondering if there is a good way to ...
I recently started competing at kaggle which exposed me with hyper parameter tuning of models such as GBM,xgboost etc.All the sources that I studied to get started with an approach to tuning invariably started with the line " Hyper parameter tuning is more of an art." Most of the texts used Gridsearchcv or randomizedse...
Actually I'm not sure if the post's title is the right one but if moderators have another one in mind then they should try to change it. Anyway. In our subject now. I'm not the super-data analyst and thus i will try to describe as better as I can the whole concept. So. Let's assume that there is an experimental process...
I have to combine two percentages from different categories, which are questions answered / total questions: 2/10 * 100 = 20% 3/6 * 100 = 50% I combined both percentages ((20+50)/2)*100 = 35% But if I combine all questions and total questions which is 5/16 and the total percentage of the combing values is 31.2%. Wh...
I have hourly summer cooling data for 4 months starting May 2016 to August 2016. In my data the cooling is high on standard business hours range from 08:00 to 21:00 during weekdays and is low in non-business hours and weekends. I have some predictor variables that also time dependent, which I used them as xreg in aut...
I have a piece of code that takes a noisy data set and uses some sort of statistical filter to plot a trend line over the noisy data. The original author of the code no longer works at my job, so I can't ask him what the filter is. I've included a snippet from the code; does any of this look familiar to anyone? The scr...
Suppose we have a Bayesian DAG with the following structure: \begin{array}{c} \alpha & & \beta & & \gamma & & \delta\\ & \searrow & \downarrow && \downarrow &\swarrow \\ && p && q\\ && \searrow && \swarrow\\ &&& x\end{array} where $\alpha, \beta, \gamma, \delta$ are hyper-parameters. I am wondering how to formally prov...
I have a panel data set with a count variable as my dependent variable. Consequently, I am now trying to identify whether I need to use a Poisson or negative binomial regression model and whether to use fixed effects or random effects. Based on my (unfortunately still limited) understanding, the countfit model seems to...
Is county-level aggregation sufficient to anonymize the data such as that found in the US Census or GSS?
Let $p_{\lambda}(\cdot)$ be the SCAD penalty. It is well known that the solution $\hat{\theta}$ to the optimization problem $$ \min_{\theta} \Big\{ \frac 1 2 (z - \theta)^2 + p_{\lambda}(|\theta|) \Big\}$$ is given by $$\hat{\theta} = \begin{cases} S(z, \lambda), & |z| \leq 2 \lambda \\ \frac{a-1}{a-2} S \lef...
This question is the same one I want answered: https://stackoverflow.com/questions/26810092/how-to-find-the-smallest-ellipse-covering-a-given-fraction-of-a-set-of-points-in Except I need to either get the algorithm as plain old math, or possibly MATLAB without any special toolboxes. The above question was answered usi...
Suppose that we have k classes, $C_1$,...$C_k$. A classifier with precision $p_i$ and recall $c_i$, for $i=1 \dots k$. A sample S, such that the classifier assigns $s_i$ elements of S to class $C_i$ fo $i=1 \dots k$. I'm not interested in which particular elements correspond to each class, but in the true number of e...
I am trying to understand the Yolo v2 loss function: \begin{align} &\lambda_{coord} \sum_{i=0}^{S^2}\sum_{j=0}^B \mathbb{1}_{ij}^{obj}[(x_i-\hat{x}_i)^2 + (y_i-\hat{y}_i)^2 ] \\&+ \lambda_{coord} \sum_{i=0}^{S^2}\sum_{j=0}^B \mathbb{1}_{ij}^{obj}[(\sqrt{w_i}-\sqrt{\hat{w}_i})^2 +(\sqrt{h_i}-\sqrt{\hat{h}_i})^2 ]\\ &+ \...
I want to build a mixed-effects model with multiple nest structure in R. For example, month nested in year, day nested in year and year. Response variable Y is temperature and predictor variable X is time. The following SAS code can give me exactly what I need. proc mixed data=dataset; class year month day; model Y=X...
I am coding in R, and I would like to verify that my multinomial logistic regression model is not overfit and to assess the performance of my model. The data that I am using is categorical and has many different variables (ie, age, cell count), but I selected only the ones I felt would be most relevant to the model. I ...
I have been given a survey to analyse. There are 50 questions, and about 400 respondents. I have calculated Cronbach alpha for the entire thing, and I get about 0.9. When I do factor analysis, I do not get nice results. I need about 17 factors, according to it. My question is: How is this possible? I would have thought...
I have a series of daily data (sales) where values are low: [0,1,..., 25 ] These are periodic data but it has strong daily variations: 10 -> 0 0 -> 6 ... When applying a prediction model and calculate the % (MAPE), I get obviously very high error. My question is : Is there any method to remove the "divide ze...
This is a real world scenario. We have some machines and these machines need some components. Someone came up with a method to select really good components for machines. The idea is that machines that use these "good" components have a lower number of failures. Now to measure the performance of this allocator, we flip...
Still very new to R and have only enough statistical knowledge to be dangerous. But I'm stuck as to whether the following is acheiving what I need it to do. Project is a flight risk prediction using imbalanced population data of 2,227 Leavers and 14,504 Stayers. I want to reserve a balanced set as my test set and set u...
I am evaluating two time series. One has a larger Coefficient of Variation (CV) than the other. But I have also noticed that one of the time series has longer consecutive deviations from the mean. This is particularly important for the purposes of my analysis. Is there a statistic or algorithm that captures that inform...
Do I have to check for outliers in variables that have been recoded in categories? for example, I have variable "age" as a predictor and there is a lady of 76 years old when the mean age is around 25. but I have categorized the age variable to >30 and <30 and only included this new variable in my analysis. should I rem...
I am trying to understand the formulas of ridge regression, lasso, and elastic net. If I got it correctly, the only difference between these 3 shrinkage methods is the penalty term, i.e. for ridge regression $\lambda\sum_{j = 1}^{p}\beta_j^2$, for lasso $\lambda\sum_{j = 1}^{p}|\beta_j|$, and for elastic net $\lambda\...
(Question originally posted on StackOverflow but users advised it was more appropriate to ask here:) I’m just starting out with R so I apologise if this is a silly question, however I have Googled it extensively and can’t seem to find an answer. I am attempting to analyse data with structure: 'data.frame': 60 obs. of...
I have data of a medical experiment and want to run a linear regression. More precisely, I have severity degrees of a disease of two independent groups (treatment and control group). The severity degrees are categorical with values {0,1,2,3} (0 meaning no disease, whereas 3 represents a widespread of the disease). In e...
I'm trying to run a logistic regression on categorical dependent variables data; The dependent variable is a choice of Yes/No/Unsure. I want to use glmer in lme4, how do I specify the family type? If I transformed the dependent variables into rate of Yes (ACC), the distribution of ACC look like the histogram below. Can...
I have to compare processed EMG waveforms (smooth curves) that I recorded from 7 different leg muscles of 4 different subjects to reference EMG data (Winter book). The problem is that for the reference EMG data I have only the mean and the sd for each time point (51 time point). Therefore I want to test if there is a s...
I have a sample of N integer values and I would like to check the null hypothesis $H_0 \equiv $ "the sample has a Poisson($\lambda$) distribution" This is, $p_i = P\{X=i\} = e^{-\lambda} \dfrac{\lambda^{i}}{ i!}, i=0,1,...$ So I've tried two approaches, both taken from the book "Simulation" 3rd edition from Ross. First...
For my master thesis I working on model averaging for panel data. So far I was not able to use common model averaging packages (BMS, BMA) because I use panel data (plm regression first differences). My first question would be, is it possible to use those packages with panel data? If not, I managed to construct a restri...
I am analyzing data from a bacterial growth experiment. In my experiment, I have different growth condition. For every growth condition, I have measured the bacterial number at day0, Day1, Day2, Day3, Day7 and Day14. So my main objective is to see the significant difference in bacterial count between Day0 and other da...
I want to simulate $y_t$ given a set of parameters $\theta = (\mu, \phi)$, where $y_t$ is given by $y_t = \epsilon_texp(h_t/2)$, $h_{t+1} = \mu + \phi(h_t - \mu) + \eta_t,\,\, t = 0,1,...,n.$ and $ \begin{pmatrix} \epsilon_t\\ \eta_t \end{pmatrix}\Bigg|(\rho, \sigma) \sim\,\,i.i.d.\,\,\mathcal{N}_2(0,\Sigma), \,\,\, \S...
I have a time series, AW1, with 365 daily observation, but I ignore if I should build my model taking the time series as given or taking the first difference. (I know many questions approach this problem, but I'm still confused as the time series presents different aspects. ) I rejected the null of a unit root, and hen...
So, I have more than 20,000 entities. Each entities has their own data point (time series). Let say entities A1 to A20000. A1 has data point from year 1 to year 60. A2 has data point from year 5 to 60, and so on. We can make some plot year vs value each year for each entities. My task now is to make a cluster of the e...
Excuse me if this question is not correct, I am not very familiar with the field. I am trying to calculate EER based on FAR and FRR, when having both upper and lower bounds (max_threshold, min_threshold). I have not come across anything similar yet, but my thinking is the following: I have classified values as genuine ...
I have daily time series data of a shop's revenue. Now I would like to test for seasonal differencing with the OCSB test originally intrduced in (Osborn et al. (1988): Seasonality and the Order of Integration for Consumption). This test is explained in more detail in (Ghysels, Osborn (2001): The Econometic Analysis of ...
I'm working on an outlier detection method using the principal component pursuit(https://statweb.stanford.edu/~candes/papers/RobustPCA.pdf). The algorithm decomposes the data matrix D = L+S; L being a low rank matrix and S a sparse gross error matrix. Here, the main assumption is that D is a Low rank matrix that has b...
I have a dataset for which I need to study both fixed and random effects. And I would love doing it with a LMM or a GLMM, but my data is not normal at all and I cannot transform by any means. So... my only option left is Bayesian statistics (which I know they rock but I don't really understand) My data looks like thi...
I had a matrix with values and I wanted to identify the outliers. For doing so, I computed the z-scores (so, I had a new matrix with z-scores) and I took those values above 3. Now, I have 2 replicates (2 matrices from the same origin). Therefore, I would like to consider both matrices in order to get real outliers for ...
How can one generate two sets of data which are different at each quantile values (say decile)? Ex: 10th & 80th percentile is 4 & 22 respectively for the first set and the same should be 8 & 44 for second set which implies the second set has larger values at each quantile. If I can generate such data, I am planning to...
I am having facing an issue with time series. I have collected data over an 18 hour time period of 1.Heart Rate 2. Running Time in HH:MM:SS.O and 3. the associated behaviour (either active or sedentary). The issue is that the data frame has over 18 hours of recorded entries (~250,000 rows) marked as either active or se...
I want to run a regression on a dataset with very few participants but with multiple related observations. How I may form random effects? i must declare them for every instance of them? I found also that, is of any help?: "[post][1]" e.g. summary(lme( Run ~ wellness* id + fit * id + happiness * id, data=df, random= ...
Is there a rule for selecting which experimental design one should carry out? I am new to statistics/ED and sometimes I find myself asking which design is best to use. My general guidelines have been (please correct if wrong): Use a Plackett Burman (PB) for screening the number of variables Use a fractional factorial...
I'm working with time series data (Forex data) using a random forest. When training the model using the caret package in R I have few options. One of the options is to use e.g. 10-fold cross validation but I'm not 100% sure that it's a good idea for time series. I could also use time series cross validation (timeslice ...
Can someone explain to me how I do a balance test in a randomized controlled experiment? Do I choose the important covariates and estimate whether there is a significant difference between my two treatment groups and my control group regarding the chosen covariates?
I'm currently working on a statistics paper for practice (complete beginner here) and need to "test the hypothesis with a t-test". Unfortunately, most of my data is ordinal (because it's from WVS 6th wave), and I'm confronted with a lot of situations we didn't get to discuss in class. I figured that an ordinal logisti...
Suppose I have a dataset consisting of $3N$ elements ($X,Y$ pairs) and I split it evenly into three subsets. I know the Pearson correlations between $(X,Y)$ in each of these subsets, and suppose they are all equal to some value $k$, i.e. $r_1 = r_2 = r_3 = k > 0$. Is it possible for the correlation $r$ between $(X,Y)$ ...
I am building a CNN and I want to maintain translational variance. Most CNNs use pooling and stride which allows for the useful side effect of translational invariance, meaning that if a feature appears in a scene it will be picked up as the same feature. But what if the position of the feature in the scene is informat...
This question has to do with the underlying statistical methodology. I have some expert knowledge of the domain but I am not certain the method I want to use is statistically sound. Let's assume that data quantity and quality is not a problem and there is no seasonality. Please let me explain the details: I have a vari...
I asked it here as well: https://datascience.stackexchange.com/questions/19998/why-is-my-tree-showing-only-one-node Hello, I have $N=1520=19*80$ samples, each of which are $p=1764$-dimensional. So $N < p$ here. I want to perform a $19$-class classification of these samples. The training data consists of $80$ samples fr...
I want to use this algorithm as a black-box, I'll be implementing it either in Python or R, but I don’t really understand it well to be able to turn it into a program. How do we choose the initial values for parameters? What exactly is q(xt, ·) & q(y,x), I understand these are probabilities, but how do we calculate the...
I have a set of drivers that are binary and a concept to measure that contains natural numbers between 1-10. I'm currently using Kruskal's key driver analysis to determine the relative contribution of each of the drivers. It's discussed as being more robust that Pearson's Correlation by taking into consideration the co...
There is something I'm not understanding about the Student's $t$-test, so I will write here an example to explain my doubt. I will write some considerations about the several steps: feel free to comment them if you think I'm wrong, also in details. Let's say I know that the mean absolute B-magnitude of the population o...
Following the paper Practical Bayesian Optimization of Machine Learning Algorithms. Link It's not clear to me as to how the hyper-parameters (different from the target hyperparameters for some other method) for the Gaussian Process (GP) is been learned. The paper mentions it as follows (Pg.4 under section 3.1): After ...
I always thought we select the model with the lowest cross validation , since cross validation is the estimate of prediction error. However, there is the "one standard error" rule according to "Elements of Statistical Learning", which choose the most parsimonious model whose error is no more than one standard error ab...
Given a finite sequence of $s+1$ IID normal random variables $X_1, \ldots, X_{s+1}$ They are spherically symmetrical. This means that the radial projection of the point $(X_1, \ldots, X_{s+1}) $ onto the unit sphere $S^s$ has uniform distribution on $S^s$. My questions are: what is meant by radial projection and how ca...
I have a network that I am training for an image classification task, with about 30 layers. The network is softmax activated at the end and uses cross entropy loss. When I train, I have been noticing the following: The training goes well for a few epochs. The losses keep decreasing and the accuracies increase. The pro...
I know decision trees commonly reuse continuous features down a particular branch of the tree and splitting them in different locations. I am wondering what the downsides are to disallowing this? For context, I am attempting to use a binary classification decision tree to create a white-box model of a feature hierarchy...
I realize similar questions have been asked several times, but I think this is different enough to warrant a seperate question. I have poisson distributed catch data with independent variables of Tool (the thing used to catch the fish), Species, and Habitat. I am most interested in testing whether different tools catch...
let's say I have the following model log(y) ~ log(x1) + log(x2) and I want to test the if an increase of 1% in x1 will will result in an increase of more than 0.2% in y. Due to the fact that we have a log-log regression, t should be calculated as follows: t = (b1 - 0.2)/Std. Error I base my assumption on the fact that ...
I have 36 variables and I want to fit simple MLP with one output. Do I need to select most descriptive variables? I think it should be better to feed MLP with all variables. I know that people are making feature selection before fitting ANN but why is it the case? Shouldn't MLP make feature selection in learning proces...
I could really use some help to determine what statistical test to use in my particular case here. I work with insects and I have two sets of individuals, a test set and a control set, on which I applied the same treatments. The data collected is a proportion type one: for each repetition in each treatment I get a ye...
I'm running a GAMM in R on count data with multiple explanatory variables, including both continuous variables with smoothers and factors, a random effect, and a Poisson distribution using the gamm4 package. After running the model, I have several explanatory variables that are signficant with p-values in the range of ...
I've looked here: How do I fit a set of data to a Pareto distribution in R? do-i-fit-a-set-of-data-to-a-pareto-distribution-in-r and I've checked out the poweRlaw library which is built for fitting data to power distributions. But all of these solutions focus on fitting data which is a single vector. I have data whi...
Let us consider the conventions on names used in the theoretical derivation of Metropolis-Hastings Monte Carlo as outlined here, for the sake of common nomenclature. What we are building is a step-by-step Markov Chain Monte Carlo (MCMC) algorithm to describe the evolution of a system in an initial state towards a fina...
What is the best approach to deal with a dataset that has unranked alternatives? For example, suppose that we have some unranked alternatives on the Games dataset: set.seed(62617) data("Game2", package = "mlogit") library(dplyr) library(mlogit) df1 <- Game2 %>% group_by(chid) %>% mutate(ch = ifelse(ch > sample(2:6,...
I want to know whether x2 is better than x1 in explaining y. My data frame looks like: study y x1 x2 Latitude Longitude 1 1.2 0.5 0.7 -4389124 12118426 1 1.8 1.2 1.5 -4389926 12110034 2 1.6 1.2 1.3 -4392865 12104837 I used glmmPQL(y ~ x1 + x2, random=~1|Stud...
I am trying to estimate a difference in difference model with 10 time periods (t=10) and many different plots of land, which are the unit of observation. Each plot of land which becomes treated at some period t (but never at t=1, so there is a pre-treatment time period) corresponds to a 'control' plot of land, which ne...
I've fit a dataset using the zeroinfl model with a poisson regression. I'm having trouble understanding why it is that when I use the predict function, all of the values are non-zero. I know that I have an excess of 0 counts, and that this model fits my data much better than the regular poisson regression. Can anyone e...
I have some exposure data, where a number samples were exposed to a specific chemical over time. The test was repeated at different concentrations. At regular intervals a group of samples was tested for chemical accumulation -- the test is destructive, so the same sample cannot be tested across the whole exposure time...
I'm still fundamentally confused how one should evaluate how well a GLM Poisson regression model fits the data. Here is an example, using R and the dataframe total_data, whereby food_type is a categorical variable. Call: ...
I am in search of a fixed intercept (through the origin) random slopes model. However, instead of additive errors, I want the SLOPE to be the source of random error. The problem is this: for a known volume of fluid, we are performing a regression between the volume and the surface area created when that volume of fl...
I have a dataset that has 6000 instances, each with 8 boolean values. mat = matrix(runif(6000*8) > 0.5, nrow=6000) colnames(mat) = LETTERS[1:8] mat = as.data.frame(mat) multidimensional_cont_table = table(mat) If I want to perform a exact fishers test on a 2 dimensional contingency table: fisher.test(table(mat[,1:2]))...