instruction
stringlengths
9
38.7k
So I have 4 algorithms about inserting an element at a position X in some data structure. I did some performance testing for each one of those algorithms. Here are my parameters that I vary. The size of my data structure (4 possible values) : 10000, 100000, 500000 and 1000000 X is the insertion position(4 possible val...
Following are the definitions of independent variable and dependent variable I found on the internet: <1> In statistical modelling, the dependent variable is studied to see if and how much it varies as the independent variables vary. <2> Independent Variable: variable that causes the variation. <3> Dependent Varia...
Suppose a regression coefficient was estimated in sample A (from country A) through a Bayesian linear regression model. The resulting posterior distribution, comprising 10,000 simulations, was obtained and stored. Weeks later, the same model was subsequently applied to an independent sample (country B), referred to as ...
I'm struggling on how to calculate the marginal $f(x)$. I'm trying to integrate $f(x,y)$ by $y$, but I couldn't solve it. The pdf is the following. $\displaystyle f(x) = \int_0^{\infty} f(x,y)\text{d}y = \cfrac{e^{-(y+x/y)}}{y}\text{d}y$, where $y,x>0$. I've been triyng to use integration by parts and substitution fo...
I want to know the mathematical relation between the sample size with the powers of 1. Kolmogorov Smirnov, 2. Cramer Von Mises, and 3. Anderson Darling. I have seen many posts and other websites saying that the power of these tests decreases when the sample size is small but can we derive a mathematical relation betwee...
Given a matrix A with dimension m by n which is a matrix of m samples and n features. Also SVD of Matrix A = U * Sigma * V^T, How to project matrix A onto its k principal components with only U and Sigma? From my understanding to project our data onto its k principal components, we need to multiply A by V thus, AV = U ...
The mean score on a Likert scale is often used as the input for a t test, and the mean is mathematically meaningful so long as the axiomatic laws of arithmetic apply. For example, one response such as "strongly agree" (which might be rated 3 on a Likert scale) would be equal to three responses "slightly agree" (rate 1 ...
I'm estimating the appropriate sample size for a RCT study, 3 groups, 3 measurements, power=90%, medium effect size (F=0.25), p=0.01 - anova repeated measures, within-between interaction. When doing this in R, I get a total sample size of 335 participants: wp.rmanova(n = NULL, ng = 3, nm = 3, f = 0.25, nscor = 1, al...
I have a few observations (58) because my same is really small since we're studying the performance of some incredibly rare individuals. Anyway, we're measuring the time durations for some behaviours but one of the variables has a lot of zeros. How can I handle that? I read that the non-negative zero-inflated can only ...
I have a neural network that I use to classify data into a number of classes; in my particular case, the classes are imbalanced, but I am trying to understand this for the general case. I am using F1 score as the metric for evaluating the network. I also would like to perform K-fold cross-validation. So, let's say I ha...
I need help, I am a statistics student and I am doing my final degree project and I am a bit lost, the steps I have taken to make the svm and logistic regression models have been: univariate analysis, elimination of nulls, etc... Transformation of categorical variables to dummy variables (all the variables in my data ...
I am working on a project where I have collected ordinal outcome data at three different time points. I am interested in modeling the change over time with these ordinal outcomes. Initially, I considered running an ordinal logistic regression separately for each time point. However, I realized that this approach might ...
I would like to conduct a model comparison analysis of a process that is modelled with a gamma distribution. To illustrate, let's consider the example of sampling the time of incidents in a factory. The data available to me consists of the times $t_k$ at which the incident $k$ occurs. To generate K samples, what I do i...
I have two lists (or sets) of data that I would like to statistically compare. More precisely, I would like to check if the difference between data list one and data list two is statistically significant. The data comes from the same sample, hence a repeated measures or paired test is required. I plotted the data in hi...
The title question here is a bit awkward because I'm really asking if this illustration I've drawn is true: Suppose we have a Beta Regression of one predictor, X, which is used to model both the response, y, and the variation of y. So, for example, at X=x1, x2 and x3, we would generate the point predictions mu1, mu2 a...
I have data on the effect sizes for 14 variables (var1-var14). Each value is the effect size of a specific treatment on a certain variable. Missing values are due to that some articles did not consider certain variables. A positive value show promoting while a negative value shows the inhibiting effect of that treatmen...
I set up an APIM (actor-partner interdependence model) in R (lavaan). No I'm facing the following issues: Model: My endogenous variable is a count variable that follows a poisson-distribution. Model: My endogenous variable is a binary outcome. Both models work out fine if I just enter them without further spe...
I am struggling to find the appropriate analysis with a microbial dataset. Here is the experimental design I have to work with: Basically I have plants from a first generation that grows in different treatments. These plants produced seeds that were sowed in either their mother's treatment or "transplanted". The secon...
I think my question would be best explained using an example. Let's say I want to train a neural network to play Tic-Tac-Toe. Since I'm using reinforcement learning I initialise the network with random weights and let it play a single game. In the fifth move, it returns an output of $[a_1=0.1,a_2=0.09,a_3=0.2,...a_n=0....
I have a dataset of events over time. Commonly, we are interested in how many events per month and how many events per year. Here is a dummy dataset: Year Month Count 2019 Jan 2 2019 Feb 1 2019 Mar 2 2019 Apr 3 2019 May 3 2019 Jun 1 2019 Jul 2 2019 Aug 2 2019 Sep 1 2019 Oct 1 2019 Nov 2 20...
I was trying to rework the examples in Epidemiology Study Design and Data Analysis by Mark Woodward using R. Example 8.12 deals with calculation of sample size to test for a population proportion of 0.3 against the one sided alternative that it is greater than 0.32. I tried two commands power.prop.test(n = NULL, p1=0.3...
Consider the fitted values from a simple linear regression model with intercept: yˆ = 7 + 4x. Assume that the total number of observations is n = 20. In addition, the explained sum of squares is SSE = 10 and the residual sum of squares is SSR = 30. Under the classical Gauss-Markov assumptions: What is the standard erro...
For the linear regression $y_t = Bx_t+e_t$ where we have the assumptions: $E(e_t)=0$, $E(e_t^2) = \sigma^2$, $E(e_t e_s)= 0$ for $s\neq t $ a ), suppose $x_t = \frac{1}{t}$ for all...
I'm trying to make an Extreme Value Analysis (EVA) of maximum and minimum temperature data from all over the US and try to fit a Generalised Pareto Distribution (GPD) according to theory after applying the Peak-Over-Threshold method. I'm using an agreed threshold at the 95th percentile of the daily pooled data into a m...
I am currently writing one of my first empirical papers. As a side note, the topic is the effect of a CEO change on financial performance. Conceptually, I decided on the DiD approach, as I have a matrix of four groups: pre and post deal, as well as CEO change and no change. Using dummy variables, this is rather easy to...
I have a dataset of 900 images, distributed across 6 classes, with 150 images per class. To develop a classifier and assess its performance, I will utilize k-fold cross-validation. In this case, I will employ 3-fold cross-validation. For each fold, I will allocate 70% of the data for training purposes, leaving the rema...
I'm calculating a posteriori distribution, which is solving this integral: $$ \int d^Jx \frac{\exp \left[\left( \vec{x}^\intercal \Omega^{-1} \vec{x} \right)/2\right]}{(2\pi)^{J/2}\sqrt{|\Omega|}} \frac{\exp \left[\left(r - a \vec{D}\cdot\vec{x} \right)^2 / 2(1-a^2)\right]}{\sqrt{2\pi(1-a^2)}} $$ $\vec{D}$ is a vector...
I need to do clustering on a large scale file (~12M rows, 18 features + id index). As a first step, i tried different algorythms in Python with a test sample (40k rows) which gave results (clearly defined clusters but the clusters are uneven in size). A coworker tried it in R and by my surprise had nearly the same clus...
I tried to simulate some stuff around the Gauss-Markov-Theorem when I stumbled over something I cannot explain. I tried to simulate the density of an OLS estimator and a LAD (least absolute deviations) estimator. Here's my R code: library(L1pack) # for LAD estimation library(tidyverse) n <- 100 x <- seq(from = 0, to =...
I want find how much percentage changed on average. Am I doing it the right way? Say I start with value 100 and change the value by some percentage Can I say that the avg. change is 2.46 % (adding all percentages and dividing by 11)? If so, why doesn't the value tally (130.57 instead of 125.18) if I start with 100 an...
Under a hypothesis testing framework, I would like to model $Y \sim X_1 + X_2 + Z$ where X_1 and X_2 are two related, likely correlated measures of the same construct. Is it reasonable to use ANOVA to test the model fit as a way to test whether this construct has a relationship with Y? Here's some R pseudocode outlinin...
Is there any upper limit on categories I can use for the dependent variable in an ordered probit model? In my current model I have at least 20 categories, but I maybe require more (up to 50). Is this theoretically possible?
We are in a regression setting. Let's start by defining some notation and terminology. $y_i$ is observation $i$ of some (response) variable $Y$. $\hat{y}_i$ is the value of $y_i$ predicted by a regression. $\bar{y}$ is the average of all observations of $Y$. $$ y_i-\bar{y} = (y_i - \hat{y_i} + \hat{y_i} - \bar{y}) = (y...
I have observations that I would like to model as responses at stations to slowly time-varying inputs at 80 candidate locations, few (perhaps 5-10?) of which are active and significant. I have observations and can model the responses at observation locations using a numerical model producing integrated Greens functions...
The expression $x^n / n!$ appears in the infinite sum defining $e^x$ and similar terms in the sums defining $\cos(x)$, $\sin(x)$, etc. I would like to know if there is some combinatorial/probabilistic meaning or analogy to the term $x^n / n!$ and appropriately an example of a scenario of selection or decision making t...
I have a GLM model, with a count predictor (length) and binary outcome. response = c(0, 1, 0, 1, 1, 1, 0) input = c(5, 10, 2, 17, 19, 13, 3) model = glm(response ~ input, family = "binomial") summary(model) The summary(model) gives me the standard error of the model - which is pretty high in this toy sample, but <1 in...
I am trying to figure out if these two are the same: Using the marginal uniform distributions of a student-t copula Using independent uniform distributions I have generated SAS code to figure this out below... and largely my results look correct. Is there any reason the marginal uniforms of a copula would be differen...
I was going through this scikit-learn link and I noticed, OneClassSVM is trained on normal and outlier both. Specifically, they are adding the outliers in the following line: X = np.concatenate([X, rng.uniform(low=-6, high=6, size=(n_outliers, 2))], axis=0) and training and predicting: y_pred = algorithm.fit_predict(...
I wanted to make sure that post-hoc tests with the Holm-Bonferroni procedure behave nominally on typical ANOVA data under the null hypothesis. To do so, I computed the p-values and FWER obtained from running Holm-Bonferroni corrected pairwise tests on N = 100,000 toy datasets. set.seed(1) N = 100000 # number of ...
Say we run a 3 (A: A1,A2,A3) x 3 (B: B1,B2,B3) repeated measures ANOVA. A significant p value for factor A, for example, indicates that there is at least one pair (A1-A2,A1-A3,A2-A3) in which the mean difference is statistically significant (let's assume there are no interaction effects). Normally, to determine the spe...
I noticed some interesting behaviour of the plm function (from package plm) in R today: When running models such as: did1<- plm(dependent ~ interaction + treatment + time + industry + year + log(assets) + control1 + control2, data = ds, model = "within", index = c("id", "time")) the plm function drops most of the inc...
Why results are different between the two examples of Cox models where Surv was defined in different ways? # ------------------------------- data # ------------------------------- # id: identification number # start and stop: start and end time points of a time interval # event: 0-alive, 1-death library("survival") l...
I am trying to test for the proportional hazards assumption on a time-varying dataset in Python specifically. The lifelines library currently doesn't support this for time-varying data. How could I test for proportional hazards? What is the difference in how the test is performed with respect to time-varying data vs. n...
I have a time series with weekly frequency (about 250 consecutive observations). My task is to use this series to perform 6 months ahead forecasts. I am using Machine Learning to forecast, with feature embedding and a recursive strategy. I am actually thinking about three possibilities: using the original weekly data ...
I have an OPLS-DA plot with three groups. When comparing two groups, the x axis is the first predictive component and the y axis is the orthogonal component. However, when looking at three groups, SIMCA software defaults to the x axis being predictive component 1 and the y axis to predictive component 2. What practical...
I have a multilinear regression model with 4 parameters and 164 observations. I want to determine the confidence intervals for each coefficient of the multilinear regression. I have the covariance matrix for the 4 parameters. The formula for calculating the confidence intervals for βᵢ, the coefficient corresponding to ...
According to page 17 of Statistical exponential families the expectation parameters for a multivariate gaussian are given by $$ \boldsymbol{H}=\left(\mu,-(\Sigma+\mu\mu^T)\right)=(\eta,H) $$ I am having difficulty understanding the $H$ term. Since $H$ is our new "covariance", how does adding $\mu\mu^T$ affect it or how...
Our research question is what is the effect of misinformation on user engagement on social media posts. The unit of analysis is a social media post. Misinformation is an indicator variable and the independent variable. Engagement is integer counts and the dependent variable. It is the sum of number of views, reactions,...
I am trying to model a dose response curve that has two phases (i.e. two steps). GraphPad Prism has the model in their workflow, but I am trying to accomplish the model fitting in R. With the objective of getting two slope coefficients (Hill coefficients) My data looks like the figure in the linked prism website. Below...
I’d like to simulate an AR(1) time series that approximates a gamma distribution rather than a normal distribution. I’d like the result to have a specified rate and shape along with a AR(1) process with a given phi. I have seen this post and understand that a strict gamma simulation is problematic, but I'd be satisfied...
I have some data from a counting-based spectroscopy experiment. Each data point is an (Energy, Rate) pair. One such data set looks like this: I choose to fit this data to a Gaussian curve plus a background with a linear slope. $$ I(E) = A e^{-\frac{1}{2}\frac{(E-E_0)^2}{{\sigma}^2}} + m(E-E_0) + b $$ I use Mathematic...
The title is not the best but I really do not know how to describe the scenario in a better way. The context Consider taking measurements of two different quantities: The time needed for a car to traverse the city of Koenigsberg The time needed for a person to traverse the city of Koenigsberg Now, this is how measure...
I am working on a problem involving subject workload in different conditions. During my experiment each subject only experiences 1 condition (out of 3 possible conditions). They complete 7 trials and each trial has a workload measure assosiated with it. I have 10 subjects per condition (30 subjects total, 210 trials to...
In R using the nlme package, how can I compute a prediction interval for a gls model with a corARMA or corAR1 correlation structure? For instance : data("airquality") require(nlme) g1<-gls(data = airquality, Ozone~Temp, correlation = corARMA(p=1, q=1), na.action = na.omit) summary(g1) newdata<-data.frame(Temp=c(0:100))...
I came across this beautiful idea of Random Fourier Features by Rahimi and Recht while working on optimising my GP model using Predictive Entropy Search. I understand the overall idea of approximating a NxN kernel matrix using finite random features. The kernel's Fourier dual needs to be properly scaled such that it re...
I have to derive some statistical distribution for a precision parameter combining one Laplace and one Gaussian distribution. However, from the absolute value arising in the Laplace density I am bit struggle to obtain some known distribution. Indeed, I am in a Bayesian framework trying to compute some optimal variation...
Suppose there are two distributions which we know nothing about except that the mean of second is greater than the first and each can be sampled. Intuitively, the estimate of both means should be able to be improved upon with this knowledge. For example if $X_i\sim N(a,1)$ and $Y_j\sim N(b,1)$ all i.i.d then one might ...
I am trying to do a comparison of the impact of COVID-19 on cancer diagnoses in the US. I have fit an ARIMA model to all cancer site monthly incidence rates for the US from January 2018 to December 2020 with a pulse in March-May 2020 and a proposed step change from June-December 2020. I feel comfortable with this model...
I have an experiment with 3 conditions. The dependent variable is ordinal (Likert style item on a 1-7 scale), and it was measured at 2 time points (before and after an event that all subjects across the 3 conditions were exposed to). I also have a few covariates of interest (categorical and continuous) that I would lik...
Suppose I have an estimator $\widehat{\theta}$ for $\theta_0$ that is root-n consistent and asymptotically normal. In the monte carlo simulations of many papers that I've read, consistency is usually demonstrated by showing that mean square error (MSE) or root mean square error (RMSE) decreases with sample size n. My q...
I am trying to translate the design information of an experiment into a mixed effects model, but I don't have any experience with mixed effects models. I was hoping someone could help me with this problem. I have an experiment with 5 predictors: Animal_ID :: [Categorical, Unordered, 18 levels] --> (1, 2, ..., 18) Ani...
We can see the source in this paper. My question is that why cross entropy loss has a boundary line in slope but least square loss has horizontal boundary. Can somebody explain?
I’m running an initial study to decide whether a RCT is worth the time and resources. I have survey results from a treatment group, but unfortunately no control. Is there a reasonable way for me to compare my survey results to those in the literature (which do not have the treatment, but use an identical survey instrum...
In preparation for fitting some more complicated distributions to survey-weighted data, I am trying to reproduce the $d\text{AIC}$ by hand for a simpler distribution (binomial in this case). I am having trouble, and would like some pointers and corrections to my understanding. The survey design based AIC $d\text{AIC}$ ...
Consider the - ELBO objective with reparameterization which is also used in VAE's:$$ \mathcal L_{\theta,\phi}(x)=\log p_\theta(X|Z)+\log p_\theta(Z) +\log q_\phi(Z) $$ The reparameterization trick makes use of $g(\epsilon, \phi)$ such that $\epsilon$ is not dependent of $\phi$ so we can push the gradients to optimize t...
I'm interested in modeling how a ranking depends on a continuous feature. I have many related groups of these rankings, so I want to use partial pooling with the usual Bayesian machinery, but I'm struggling to understand how I should define the model for an outcome variable that represents ranks. Each set of rankings r...
I am new to ML, and just learned about the decision tree, and how entropy and information gain are used for a single tree. I am currently learning about random forest now, and some tutorials mention that a forest is formed from a number of trees, and at the end, majority voting is used on the collection of individual c...
We reject $H_0$ with criteria $\alpha$, saying that the probability of falsely rejecting $H_0$ (p value) is less than the probability of making a type I error that we permit ($\alpha$). $\alpha$ is the probability that we 'reject' $H_0$ when assumptions and $H_0$ are TRUE. (Thus the probability that we permit type I e...
I'm trying to assess the predictive power of some time series models (LASSO, ARIMA, UR) on time series data, but I have a problem. I am conducting simulations with $N$ data points, $P$ potential predictors ($P>=10$), where the true variables are $x_1, x_5, x_9, x_{10}$. I am performing cross-validation using the slidin...
I am attempting to create a benchmark for probabilistic forecasting of time series to test other models against and figured that a linear ARIMA/ARMA model would be a good starting point. I thought that given how much literature there is on these models, that a closed form solution for multi-step density forecasts condi...
Suppose a situation where NHST gives out $p=0.001$. Since there is a rare chance of observing the observed value when $H_0$ is true, I can reject $H_0$. But the observed statistics still can be observed in a population. When it is observed in the population, my rejection is a mistake. Since the probability of observing...
I have two sets or lists of data that only include Pearson correlation results. The values include positive and negative Pearson correlations, say list 1 and list 2, such as follows: list_1 = [0.32, 0.15, 0.6, ...] list_2 = [0.53, 0.02, -0.43, ...] The number of values in both lists is always the same. The number of v...
I have data on ~100 subjects: blood values taken on different days (day 1, 4, 7, and 11). The subjects undergo different treatments (but only one treatment per subject) and may develop different complications and I'd like to see whether these are reflected in the evolution of their blood values. As the values on differ...
Right now, I am working on the comparison of two different calculation algorithms for computing the dose deposition on a patient during a radiotherapy treatment. More specifically, I am trying to evaluate if the difference $\Delta y$ on a dose coverage parameter computed with the two algorithms is correlated with the c...
I am studying the impact of an event on around 100 timeseries $i$ with weekly observations $t$. $y_{i,t} = \beta_{1}\text{post-event} + \beta_{2} \text{week number} + \beta_{3} \text{(post-event X week number)} $ where the week number is set to 0 the week before the event. My goal is to understand which timeseries are ...
I'd like to define parameters $\beta_i$ for $i=1,\ldots,I$ for a problem so that they automatically obey some constraints. The constraints are: $\sum_{i=1,\ldots,I} w_i \beta_i = c_1$ and $\sum_{i=1,\ldots,I} w_i \beta_i^2 < c_1^2 + c_2$, where $c_2>0$, $w_i>0$ and $\sum_{i=1,\ldots,I} w_i = 1$. I know how I would ac...
The description of the tag in this website states that it Refers to the conditions under which a statistics procedure yields valid estimates and/or inference. E.g., many statistical techniques require the assumption that the data are randomly sampled in some way. Theoretical results about estimators usually require as...
I trained a neural network with dropout regularization and computed uncertainty scores for predictions on a test set. However, I found that these uncertainties exhibit a very weak correlation (Pearson: 0.03, Spearman: 0.01) with the model's error, rendering them ineffective. Under which conditions do MC-Dropout-based u...
I was wondering if anyone knew if there was any guidance regarding correcting for multiple hypothesis (using for example Bonferroni correction) when using discrete choice models (for example MNL or MXL models)? I've never seen this done in the literature, but wondering what the reasoning would be for not doing it...
I have a dataframe and I created 3 groups based on the value variable following the fisher-jenks classification. Now I am supposed to measure the within and between groups variances. How can I do so ? Here's my dataset : dput(data) structure(list(Id = c(46977, 47055, 47133, 47211, 47289, 47367, 47445, 47523, 47601, 4...
I want to calculate the sample size for an analytical cross-sectional study I'm planning on doing. I want to find out if there's an association between an exposure and a disorder. I will be finding out the number of people exposed and non exposed who develop and do not develop the disorder. What are the values I need ...
I have access to some data for two variables - let's call them x and y. In particular, I have the distribution of data separately per each variable, something that allows me to estimate the marginal distribution for each variable - let's call them $f_x(x)$ and $f_y(y)$. From those histograms I see that both variables h...
I would like to find out if there is any impact of social media on the creation of entrepreneurial opportunities for entrepreneurs. I have two groups (Online Business and traditional Business) and 20 statements in total that I have measured using 5 point likert scale (strongly agree, agree, neutral, disagree, strongly ...
Given the following table of predictions vs. actual states: A B C D A 11 9 4 3 B 2 120 3 6 C 1 1 9 3 D 0 0 0 0 You can see that none of the actual states are D. I wish to calculate some confusion table metrics (I can handle the multi-level issue), bu...
First off, I don't have a heavy data science background, so if I have the completely wrong approach for this, a pointer in the right direction would be appreciated. I am trying to build a series of models to predict how much debt will be acquired by a number of customer insurance policies who cancel. My first model is ...
Say that we have a ground-truth partiton $U$ consisting of $k$ clusters and two partitions $V_1$ and $V_2$ obtained via two different algorithms : $V_1$ consists of $k$ clusters. $V_2$ was obtained through an apporach that does not need an à priori number of cluster. Say it consists of $g$ clusters. When computing me...
I have transformed my categorical variables to dummies and I have used the lasso method to decide which variables I choose to do the logistic regression, my question is: for the svm model do I need to use the variables that have come out with the lasso or I can use all of them?
I'm trying to interpret the output of a GLM from a tutorial that models species abundances as a function of environmental data and species traits. The function traitglm comes from the mvabund package and in the author's words: "It takes three arguments: L; R; and Q, and uses these to construct a regression model for a...
Most scientific papers present data using mean (95%CI lower bound, 95%CI upper bound) but I have not seen mean ± 95% CI (upper bound - mean). Can I use the latter to present my results? e.g., mean = 1.0 CIlb = 0.8 CIub = 1.2 Can I present the result as 1 ± 0.2 (mean ± 95%CI)or must I present as 1.0 (0.8, 1.2)?
I am new to the field of NLP and would appreciate any guidance please. I am trying to understand how word embeddings can be used in clustering and topic modelling. If I create word embeddings for every word in a corpus, with e.g. 4 dimensions per embedding, the number of features becomes 4X more than a bag of words mod...
The data table for my company's salesmen/women commission for FY23 follows. Below, I compare the commission of each age group to know which age group is performing well (which I don't think matters), and please notice the groupings are arbitrary and hence meaningless. I compare commission for each age group not intend...
I am currently developing an instrument and have some questions on the use of kappa statistics for interrater agreement used for content validity. I have gone through previous literature and I still can't seem to find the exact differences between kappa statistics, Cohen's kappa and fleiss kappa. What I'm particularly ...
When using MSE in linear regression, I understand that we aim to minimize the average of the square errors between the predicted value $f(x)$ and the actual label y. My understanding is that we aim to reduce the geometric difference between $f(x)$ and the real value $y.$ I think this comes from $f(x)-y.$ My initial tho...
What type of regression would be best suited to do a multiple regression analysis with $E$ as the dependent variable? Is using a binomial regression okay? Thanks for any suggestion. For each of my participants, I have 4 data point: score $A$: count between 0 and 10 score $B$: count between 0 and 5 score $C$: count bet...
I have two data sets, DF1 and DF2. DF1 has millions of observations, and 20 variables. DF2 has ~100,000 observations, and 40 variables. The DF1 variables are a subset of the DF2 variables. I want to predict Y for observations with all of the DF2 variables, but I also need interpretable predictions. So I'm trying to cre...
I would like to fit something like a Cox model but each covariate on my data could have been measured at a different time, different for each person. Is there any alternative survival model allowing to use simultaneously different times for each covariate? For example John could have had a flu in 2010, a stroke in 201...
I've seen this done in NICE HTA submissions where a hazard ratio from a meta-analysis has been applied to a range of survival functions. More generally, are you able to apply a hazard ratio, however it was estimated, to any survival curve? With this, are you then able to get survival probabilties by converting it to th...
Let $(X,Y)$ be bivariate normally distributed with $E[X] = E[Y] = \theta$, $Var[X] = Var[Y] = 1$ and $cov[X, Y] = \rho, |\rho| < 1$, where $\rho$ and $\theta$ are unknown. Find the minimum risk location equivariant estimator (the Pitman estimator) for $\theta$ with respect to squared error loss $L(\theta, d)=(d−\theta)...
I am attempting to perform mediation analysis to explain variable $y$ as a function of $x$, $z_{1}.$ and $z_{2}$. $x$ is the variable of interest, while $z_{1}$ and $z_{2}$ are the mediating variables. I run the following regression: $$ y=\beta_{0}+\beta_{1}x+\epsilon $$ and I obtain an estimate of $\beta,$$\hat{\beta}...
I make fisheries work, and I need to estimate some parameters from the von Bertalanffy equation: Lt=Linf*(1-exp-K(t-t0)) here Linf, K, and t0 are the parameters that I want to estimate by FSA package and nls function While using R studio this error occurs at the step of nls as shown in the image: My data are Fish age ...