instruction stringlengths 9 38.7k |
|---|
Rasch models are typically fit through an item response theory framework, but can also be estimated through a mixed effects model (e.g., see here). This is highly useful in my case because of some of the reasons the authors mention in the article.
However, when fit through an IRT framework, you can typically estimate t... |
I have a question in terms of evaluating the effect of a dummy $D$ to endogenous variable $X$ in two-stage least squares (2SLS) regression.
Suppose I have dependent variable $Y$, endogenous variable $X$, exogenous variable $W$ and $D$ ($D$ is categorical which should be converted to a dummy), $Z$ is an instrument. I am... |
I have read that composite outcomes are common in cardiovascular trials because they give a holistic view of a treatment effect. Assuming outcomes are frequent enough for statistical power to not be an issue, why would this be the case? Wouldn't it always be beneficial to measure the effect of treatment on outcomes ind... |
I am looking to compute the variance covariance matrix for the standard linear regression coefficients $\hat{\beta}$ when:
$$Y = X \beta + \epsilon $$
and $\epsilon \sim N(0,\sigma^2)$. I have derived this in two different ways but I am getting contradicting results and would like help figuring out where my derivation ... |
Given prior $ \mu \sim \mathcal{N}(\mu_0, \tau^2) $, likelihood $ X_i | \mu \sim \mathcal{N}(\mu, \sigma^2) $, we know the closed-form solution of posterior is $ \mu | X_1, X_2, \ldots, X_n \sim \mathcal{N}(\mu_n, \tau_n^2) $ with $ \frac{1}{\tau_n^2} = \frac{1}{\tau^2} + \frac{n}{\sigma^2} $ and
$ \mu_n = \frac{\frac{... |
It is common to draw a neural network as a "web" of neurons and connections, such as the "web" below of a multilayer perception that has input neurons in white, hidden neurons in black, and the output neuron in blue.
It is also possible to do this for a convolutional neural network, such as the drawing below that show... |
1.I want to interpet the coefficients of RDD model above. The dependent variable is log-transformed. Should it be the same as linear regression even though I am using local polynomial regression with a selected optimal bandwith?
Should I interpet treatment effect as exp(-0.191)-1=-0.112 = -11.2% ?
Then, the treatment... |
I have data that is looking at comparing a cheap (T) to expensive (V) ultrasound device with the hopes that the cheap is the same as expensive. There was 4 different examiners that used 4 different views to determine the presence of osteophytes. I have used a generalised mixed-effects logistic regression followed by an... |
I am doing a power analysis (PA) to find the minimum sample size to detect a difference between two groups (with acknowledgment of the theoretical problems involving using p-values, etc.).
The mean and SD of my predictor variable is a value between 0 and 1 (up to two decimal points after 0). The predictor variable is a... |
$\operatorname{Var}(\bar X)=\sigma^2/n$ is the formula of variance. I want to check my understanding of this concept. Suppose I want to compute the mean household income of a given city. I collect all possible sample of size $n=30$ (say I pick $30$ households in each suburb) and then compute the mean of each sample. ($... |
I have provided a hypothetical example to illustrate my question. Assume an alternate hypothesis for a difference between two variables of interest (arbitrary for the example), analyzed with a chi-squared contingency test (two-tailed).
Variable 1: 3 levels (categorical)
Variable 2: 2 levels (dichotomous)
I’ve kept this... |
Here is the probability density function (unnormalized) of a covariance matrix: (from a Bayesian perspective):
$$
f(\boldsymbol{V})\propto \det(\boldsymbol{V})^{-\frac{N+J+1}{2}}\int_{\mathbb{R}^{K}}\exp \left [-\frac{1}{2}\sum_{i=1}^{N}(\boldsymbol{y}_{i}-\boldsymbol{X}_{i}\boldsymbol{\beta})^{\top}\boldsymbol{V}^{-1}... |
Suppose that I have created train/validation/test splits for model building.
I optimized the hyperparameters using the validation set and chose the parameter values which gave the highest accuracy. To estimate the accuracy in the production, I test the model on the test set.
Now, suppose that at a later time, I decided... |
I am struggling to find the main references for the Bayesian Event Tree method.
At least in my research field, people cite authors that have applied this method to their specific problem, without citing those who first introduced it.
Statisticians, I suspect ;)
Can you help me with citing it properly?
|
I am looking at whether certain animals or categories of animals are more likely to use human-made trails than natural trails. We used camera traps and recorded for every case which animal it was, whether it was on an open or closed trail, and to which category this animal belonged. Here's an example of what the datase... |
I used the function survregbayes from the package spBayesSurv in R to perform a spatial accelerated failure time model with CAR frailties. The event I analyze is the digitalization of cities. The problem is that I don't understand how to interpret the coefficients of the model.
In particular, I get:
Accelerated failure... |
I am studying a time process, consisting in events occuring at some dates, one after the other (typically one event every 1-2 days, sometimes several in a day, with data covering circa 20 years). I would like to test if there are some events that are missing in the series I handle. Do you see some method I could apply ... |
I am performing a logistic elastic net regression to assess which variables influence the outcome and evaluate it. I am working with an imbalanced dataset that consists of 50 cases and 1700 controls. My objective is to assess the best approach for model development and evaluation.
At first I performed a traditional tra... |
I am quite new to the field of survival analysis and am getting lost and confused with all the different types of bias that can occur, particularly in observational studies. For example, it appears the use of time-varying predictors can both reduce, but also incur bias! I realize that it will take intensive study to ma... |
I have some epidemiological data, relating to the prevalence of obesity at UK local authority level. For the purpose of exploration I want to derive the median obesity prevalence. However, I need to account/adjust for measures of deprivation and ethnicity.
What methods are there for deriving an adjusted median value?
|
I was reading about mixed models and I am confused about AIC and BIC criteria. My first question is can I use this types to calculate them?
AIC=2d-2ln(l)
BIC=dln(n)-2ln(l)
where d: is the numbers of parameters.
And my second question, the problem we are facing in mixed model is calculating the number of parameters?
|
After implementing the GHK algorithm, I noticed an unexpected behaviour that lead me to question the validity of the algorithm, but since this is widely used I am sure I must be missing something.
Specifically, even choosing a bivariate normal with zero-mean and symmetric bound (e.g. (-Inf,0) and (0, Inf) respectively,... |
I need to run a survival analysis on my data. Based on the AIC, the lognormal distribution is the most suited one. Can I report the estimates and 95% CI as they are, or do they need back-transformation because of the lognormal distribution? If so, how do I back-transform them?
Code:
fit.hbe.rev1 <- survreg(Surv(Latency... |
If I wanted to analyze data taken of patients meeting pre-specified criteria from several hospitals through a linear regression (say how hypertension changes given age and sex), I think that a mixed/multilevel model would be appropiate, since data are non-independent and patients can be clustered by hospitals.
But, if ... |
I research covariate shift solutions for ML models. Some papers/books (e.g. "Probabilistic Machine Learning" by Kevin Murphy) claim that one needs different solutions for covariate and label shifts, I claim they are the same.
Definitions:
Covariate shift - P(Y|X) remains the same, P(X) changes between source and target... |
Currently I'm tasked with analysing data taken with optical emission spectroscopy (OES).
These measurements serve the purpose of identifying regions on the sample rich in certain chemical elements (species). The end result should be a "map" of the sample for each species showing its concentration. There can be a mix of... |
I am analysing some data using the glmer analysis and I would like assistance as how I could solve the following error massages. I tried fixing the problem using some examples from the internet but I don't seem to find a solution. I am trying to determine the impact 9 parameters might have on the feeding rate of insect... |
Hopefully someone can guide me on the following.
I have a large dataset (> 151k firms with multiple observations per firm).
My dataset looks at firm failure using counting process style and my independent variables are gender, age & nationality diversity and team size. These variables can vary over time (but I wouldn't... |
I am seeking a measure of relative variable importance or relative explained variation that will apply to all types of linear and nonlinear regression models and that requires only fitting one model. As an example suppose we have the model y ~ x1 + x2 + x1:x2 with the last term representing an interaction term. The m... |
There are numerous threads on CV about the definition of and intuition about a confidence interval. However, I was surprised that none contained my intuitive reasoning about a confidence interval, so perhaps it is wrong.
Here it goes:
The confidence interval defines a range of hypothetical sample effects which — under... |
This might be very simple so excuse me in advance. I'm trying to test if the difference between five test scores is statistically significant in a pre\post experiment with three different times, as shown in the table below (where each cell have one point), what statistical test is adequate here?
test1
test2
...
t... |
I'm working with GPS data and have billions of GPS points stored in a DB. I'd like to be able to use this to create a class likelihood function that I can use somewhere else as as a visualisation or classifier.
Example:
Let's say my GPS data is for cars and there are only three classes of cars; 4x4's, delivery trucks, ... |
I have time series data with some value and corresponding time. These measurements are divided into groups (I plotted each group in a separate plot). I want to build a linear regression model for each group. The problem is that some groups can be divided into subgroups by time (after some reset) and you can make a regr... |
I´m working towards the resolution of all questions in Efron & Tibshirani 1993. The Introduction to the Bootstrap. I got stuck in question 8.6.
It is related to the bootstrap of an AR process, considering residuals, which leads, in each step, to the generation of the bootstrap sample, using
$z^*_2=\hat \beta z_1 + e^*_... |
I am quite new to statistics and I am messing myself a bit. Imagine I have a group of 1000 people aged under 18 and 700 smoke and 300 do not (70% and 30%, respectively). Is there a test to see if that is significantly different from 50%. I think there is not as they are from the same group of people... but just in case... |
Let $X, Y, Z$ be r.v's. Suppose $X$ has some influence on $Y$ and $Z$, and $Y$ has some influence on $Z$. Can we quantify the influence $X$ has on $Z$, which is not due to the influence $X \rightarrow Y \rightarrow Z$?
Regress $Y = \beta_1 X + \alpha_1 + \epsilon_1$, then $Y_X = \beta_1 X + \alpha_1$ is the part of $Y$... |
What should be the appropriate prior in case of a dummy variable and an interest rate variable which has values like 4.5, 4.6, 4.9 etc in a Bayesian linear regression?
|
As the title says, I'm trying to figure out how the length of follow-up affects the value of the hazard ratio (e.g. from a Cox model). If proportional hazard holds, then presumably the hazard ratio point estimate should be identical regardless of whether we truncate followup at 1 year, 2 year etc. If it does not hold a... |
I have several time series datasets which we can label as y, x1, x2, ..., x5. Particularly interesting is the relationship between x1 and a newer dataset z1. z1 is akin to an enhanced version of x1 - it possesses richer information and is on a broader scale due to the encompassed details. However, z1 has a limited hist... |
What I have done is use Cholesky decompostion to get $X = \rho X^{1} + \sqrt{1 - \rho^2}X^{2}$ and $Y = X^{1}$ where $X^{1}$ and $X^{2}$ are independent standard normal. Then
$$
\begin{aligned}
P(X>Y>0) &= P(X>Y,Y>0) \\
&= P(\rho X^{1} + \sqrt{1 - \rho^2}X^{2} > X^{1},X^{1} > 0)\\
&= P(\sqrt{1 - \rho^2}X^{2} > (... |
I am doing pairwise comparisons between 5 groups. The Dunn test with Bonferroni adjustment only came out significant for two groups (say A and B). However, when I added 5 data points to one of the groups (say C), the significant difference between A and B disappeared. total N= 148 (A= 28, B= 43, C= 13). Dunn's calculat... |
I am reading the book Statistical Methods In Online A/B Testing.
I have two questions:
1.
Please Consider the scenario, an A/B test in which the variance of A and B groups are assumed to be same, and the conversions Vs users is recorded.
For group A, n1 = # observations(users) in A, p1=(# conversions)/(# users) for A.... |
How did we derive the PDF and CDF highlighted in green?
Thanks
|
I'll state what I'm trying to prove below.
For a Poisson process $N(t) \sim \operatorname{Poisson}(\lambda t)$,
$$
P\left(S_n \leq t\right)=P\left(N(t) \geq n\right)=1-P(N(t)<n),
$$
where $S_n=\sum_{i=1}^n X_i$ and $X_i \stackrel{i i d}{\sim} \operatorname{Exponential}(\lambda)$.
I'm trying to prove this by showing t... |
I found although the Gauss-Markov Theorms are so widely used, it has so many different versions. Appreciate it if anyone could help me clarify this specific question I have.
Given the OLS estimators:
$$
\begin{align*}
\mathbb{E}(\hat{\vec{\beta}})&= \vec{\beta} + \mathbb{E}[(\mathbf{X}^T \cdot \mathbf{X})^{-1} \cdot \m... |
I am currently self-studying Generalized Linear Models after learning about linear regression in my undergraduate study. My undergraduate program is not statistics so I have some difficulties in understanding some concepts here.
Current Understanding:
Given a Newton-Raphson update equation:
$\beta_{new} = \beta_{old} -... |
Let's say someone asks me: What are the odds of getting a tail when a coin is flipped twice?
Assuming the coin is fair and tosses are independent, I see two ways of solving this problem:
If we tabulate the results, we know the possible outcomes are: TT, HT, TH and HH. Therefore, the probability of getting at least one... |
I'm analyzing 2 groups where all of the subjects in one group are still alive, i.e. one group is entirely right-censored. The other group is a mix of censored and uncensored. Is a Cox proportional hazards model valid to use here? I suspect it fails the proportional hazards assumption, plus Matlab's coxphfit function fa... |
Suppose we have a simple competing risks model and have a calculated $CIF_K$ for two events $\{k_1, k_2\} \in K$. By definition $CIF_{k_1}(t_i)$ gives us the probability that event $k_1$ has occurred on or before time $t_i$. Is it possible for us to recalculate $CIF_{K}$ given a known minimum survival time?
That is, if... |
I have 2 surrogate indices, and 2 individual markers that were used to compute these indices. I also have demographic variables age, sex, education, smoking, drinking and exercise. The surrogate indices were developed to measure the same health condition. I want to know which of these indices is superior at discriminat... |
I came across the Cochrane–Orcutt estimation, which is concerned with regression-type estimates in cases where errors are AR(1) correlated. My question is whether I can formally apply the inverse of the $(1-\theta L)$ operator, where $\theta$ is the parameter to be fitted and $L$ is the lag operator, to the whole equat... |
I'll use the data azdrg112 from COUNT package. The los will be the response variable while the remaining three variables gender, type1 and age75 are the explanatory variables. Here is the plot of the response
install.packages('COUNT')
library(COUNT)
data("azdrg112")
barplot(table(azdrg112$los))
The responses seem to ... |
Suppose that I have 4-by-6 factorial design where both factors are within-subject variables, and I want to perform a repeated-measures ANOVA on the data. Using GPower, I calculate the sample size required to achieve 80% power for an effect size of F = 0.25 for the interaction between the two factors. I input the numera... |
My goal is to have higher frequency data (quarterly) for the GDP of my region (yearly data) through quarterly auxiliary data. Therefore my goal is to perform a Chow-Lin regression using the package tempdisagg in R Studio. The time series are not stationary.
My question is: do I have to render the time series stationary... |
I have a dataset where the dependent variable is Sales. The independent variables are Media Spends 1, Media Spends 2 and Covid dummy. I am trying to build a Bayesian Linear Regression model. The covid dummy is a dummy variable which has 0 and 1 as the values. For the coefficients of Media Spends 1 and 2, I have specifi... |
Let $(X_n)_n$ be a sequence of discrete random variables and assume that
\begin{equation}
\Pr\big(X_n=x \, | \, X_{1},\dots, X_{n-1}\big) \geq a \quad \text{ for all } n=1,2,\dots
\end{equation}
where $a\in [0,1]$.
Consider a sequence of random variables $(Y_n)_n$ such that
$$
Y_n=f(X_n, Z_n)
$$ where $(Z_n)_n$ is a ... |
Show that the scaling transformation $\textbf{y}_i=D^{-1}(\textbf{x}_i-\bar{\textbf{x}})$ can be written as $Y = HX_{n\times p}D^{-1}$ where $H$ is the centering matrix $(I_n-\frac{1}{n}\textbf{11}')$.
I know that $HX=\pmatrix{\textbf{x}'_1-\bar{\textbf{x}}'\\\vdots\\\textbf{x}'_n-\bar{\textbf{x}}'}$. Using this I can ... |
I want to conduct a retrospective study, validating an algorithm. My data will be something like the following:
id
doctor
prediction
1
0
0
2
1
1
...
...
...
n
0
1
My study design is non-inferiority, so I was thinking of using a two-sided two-sample test to test if the sensitivity of the algorithm is n... |
I'm doing research on labour councils and their behavior regarding qualification. So I'm working with a logistic regression with "visited seminar in the last year" as a dependent variable and several independent variables. One interesting independent variable would be the "compatability between council work and profess... |
I'm a bit confused as it relates to the hazard ratio.
It seems to me that the hazard ratio is a time varying quantity however it seems that studies report a single number.
Read this https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5045282/ and it seems to imply that a hazard ratio is assumed constant? I find that very hard... |
I hope this question fits the forum. I'm not a statistician, but have received decent training in statistics and use statistical modeling in my daily work. I've been tasked to give a very condensed "info-package-plus-practice-workshop" about how to run and interpret statistical analyses in social sciences to a group of... |
I have been reading about Quantile Regression and the Quantile Loss function, but I have to admit I am a bit lost as how to practically implement it. I would like to use it to calculate the prediction errors of a Machine Learning algorithm (in my case Random Forest). I would like to do it manually without relying on pa... |
For my doctoral thesis work, I conducted a small feasibility study on the use of a virtual reality therapy protocol in preventing aggressive recidivism in 2 treatment-resistant schizophrenic patients.
The study is prospective, observational, uncontrolled, and open.
I administered most of the scales before and after the... |
I tried to put p=5 and q=7 but it's not working.
|
I've built a logistic regression model for binary classification with a high F1 score, but when I run Box-Tidwell tests on continuous independent features/predictive variables, I find non-linearities in the relationship between those features and the logit of the outcome variable. Should I be concerned? I know that lin... |
I often see charts displaying multiple time series plotted together and they are often accompanied by explanations relating one series to the other. For example, in the below chart, one might say less unemployment leads to more car sales.
I understand these logical relationships are meaningful. However, when I see one ... |
let's say I have some function, $f(\vec{x})$, whhere the input is a vector of very large size $\vec{x}=[x_1,x_2,x_3,...x_n]$. n is tens of millions, but let's say for now it's just very large. I can of course calculate $f(\vec{x})$ for any given input, but it's a very complicated function so taking analytical derivativ... |
My stakeholders have manually recorded data for patients enrolled in an intervention, which is causing data issues that I need to resolve in order to move to determine what is the appropriate statistical approach.
Each person has a unique medical ID number that can be used. The stakeholders created a field called famil... |
I have many "grayscale" images i.e. 2d-arrays like the following:
i.e. dark rectangles which are tilted by an angle $\alpha \in [-3^\circ, 3^\circ]$ and a bright but noisy background. I have a (rather slow) method to determine the angle based on Hough transform, thus I have sufficient training data.
Question: Is there... |
In a cohort study, I am trying to assess the excess number of deaths in patients with a specific condition during follw-up. I am trying to do this by using an additive hazard model and am using the package AddHazard with the following model:
fit <- ah(surv(time,outcome)~exposure, ties=F, data=data, robust=F.
summary(f... |
I have some data showing the count of deaths in a population. The data are stratified by age. For example, the data might show that at age 40 there were 30,000 years of observation and 300 deaths.
In some cases there are zero deaths; principally because there is little observation time. For example, the data might show... |
Here is my data setup. The dependent variable is mean resultant length (MRL), i.e., in context, the degree to which a firing unit is firing in phase with a particular frequency of the local field potential in the brain. The variables of interest are group, neuron type, and period type. Other variables are animal, un... |
In my GARCH(1,1) model simulations, I generated (based on two different distribution assumptions) returns and conditional volatilities for 8 stocks across 3 scenarios over a 20-day forecasting period. These scenarios include:
Basic Scenario: Comprising two matrices of size 20 x 8 x 1000 for simulated returns and volat... |
I am trying to do synthetic control method with 2 treated provinces, 10 non-treated provinces, and 7 outcomes. Can anyone let me know which stata command I can use?
|
$y_{t}$ follows a covariance stationary AR(1) process
$ y_t = \phi y_{t-1} + \varepsilon_t \hspace{1cm} \varepsilon \sim \mathcal{N}(0,\sigma^2) $
I want to simulate a time series $y_{1:T}$. Can I use the unconditional moments to simulate the time series, namely draw from
$y_t \sim \mathcal{N}\left(0, \frac{\sigma^2}{1... |
I have the following situation, which I've mapped to an example below.
At the conclusion of an A/B test done on a website I've a metric I care about. Let's assume its the number of users clicking on a signup button with the control set of users seeing a blue colored button while the treatment sees a red button. We obse... |
I'm reading up on asymptotics and hypothesis testing and was thinking about how they link together with regression coefficients.
I have read that the CLT shows that the standardised sample mean converges to the standard normal, and this allows us to carry out hypothesis tests using the t-test.
I was wondering, does thi... |
I am new to data analysis. Apologies if anything below needs more clarity or if this is very simple.
I am curious about decomposing the relationship between a y and an x, but I want to know how a set of z variables affects the relationship and the y.
A store allows independent vendors to sell their goods outside of the... |
Given a clustered data set with no variation within a cluster, shouldn't a regression weighted with the inverse cluster size give the same results as a regression with only one observation per cluster?
Here is sample data (5 clusters with same observations per cluster) with sample code in R:
data = as.data.frame(cbind(... |
I have learned that serial correlation is a problem in linear regression as the idiosyncratic error terms are correlated which leads to the variance function of the coefficients to be misspecified and inefficient. The proof of this seems fairly straight forward, as shown by Ben Lambert on Youtube.
I was wondering, give... |
I am using SMR weights in a logistic regression model. Everyone in the exposed group gets a weight of 1, and everyone in the unexposed group gets a weight of propensity score/(1-propensity score). Because there are so many more unexposed, the weights in the unexposed group are very small. If I divide all the weights... |
For calculating posterior probabilities numerically, I did not understand that why is in the following codes they have divided by 0.001 in the denominator to calculate Numeric_Posterior?
Theta <- seq(0, 1, 0.001)
Likelihood <- pbinom(2, 10, Theta)
Prior <- dbeta(Theta, 4, 4)
Numeric_Posterior <- Likelihood * Prior/sum... |
I have been trying to work through this idea for a few days now, and I think I am just really confusing myself at this point so thought I could hopefully get some help.
The basic idea is, I have 1 control / reference group and 3 treatment groups. I do not care about any comparisons between any treatment groups to each ... |
I have a question regarding the comparison of the following two multilevel models:
Null model: outcome.nullmodel <- lmer(outcome ~ 1 + (1 | ID), data=multileveldata)
Random slopes model: outcome.rs <- lmer(outcome ~ 1+ predictor_L1+(1+predictor_L1|ID), data = multileveldata)
I read in some articles that a random sl... |
I want to execute this code that work well when there is no missing values :
results_table <- NULL
for (i in 1:3) {
for (j in 1:4) {
y <- Data[[paste("Y", i, sep = "")]]
x <- Data[[paste("X", j, sep = "")]]
regression <- lm(y ~ x, na.action = na.omit)
result_table <- as.data.frame(coef... |
In the following fixed-effects model, $EI$ is a dummy variable indicating an economic integration agreement in place between $i$ and $j$. $A$ is used to index the specific agreement an $i, j$ pair belongs to. $Y_{i,j}$ represents the volume of exports. Assume $A$ = {1,2,3}, meaning there are 3 different agreements in t... |
I am doing some data analysis on medical data and need to know what the most appropriate statistical method to use would. the data will be for a particular disease and checking against patients HIV status. example:
Since this is a 1 x 3 matrix, I cannot calculate using Chi Square since the expected will equal the obse... |
I am trying to analyze data from EEG electrodes to understand how brain activity changes in different coginitive states (for simplicity, assume that there are only 2 states: baseline (A) and chanelled attention (CA) - a state which was induced in study subjects by making them play a video game that required high focus)... |
Suppose I have several compositions of 4 parts $A_i, B_i, C_i,$ and $D_i$ with $i = 1, \ldots , n$ taken from two locations ($X$ and $Y$), which are coordinates in the simplex $S^4$. I apply the isometric log-transformation to each composition to obtain the following balances based on the sequential binary partition $\... |
Let’s consider a signal that is circularly symmetric complex Gaussian process (proper):
$$ s \sim \mathcal{CGP}(0, C, 0) $$, and,
the covariance has the following form:
$$ \mathbf{C} = \mathbf{C}_{rr} + \mathbf{C}_{ii} + j( \mathbf{C}_{ir} - \mathbf{C}_{ri} ) $$
where $\mathbf{C}_{rr} = \mathbf{C}_{ii}$, and $\mathbf{... |
In the usual construction of a Kaplan-Meier curve in R where individuals are observed from when first at risk through to either failure or censoring, one can specify something like:
survfit(Surv(time, status) ~ group, data = dat)
Which creates separate survival curves by levels of the grouping variable, where there is... |
I would like to run a nested logit model with panel data in R or Stata, but I am not sure how to proceed. I want to understand which factors influenced a person's choice to work full time, work part time, or not work at all.
I have the following panel dataset:
1,500 person-year observations -- There are 50 people in m... |
On the section "STL decomposition" in the 2nd edition of Forecasting: Principles and Practice, it says that the seasadj() function can be used to compute the seasonally adjusted series but it does not say how this seasonally adjusted series is computed. I'm wondering how to do this in python's statsmodel package as the... |
I am trying to assign to images the probability of them containing a metal building. The images can contain either metal buildings, non-metal buildings or no building.
Let $B$ be the event that an image contains a building, and $M$ be the event that an image contains a metal building.
I have a test $T_B$ which tells me... |
can you tell me if this is ok?
While the AUC (i.e. AUC of 0.6) we got is acceptable since it's bigger than 0.5, we may need to re-evaluate at our cutoff selections again. Because we can select cutoffs by our choice, sensitivity and specificity would change if we switch a cutoff from 0.7 to 0.68, for example. Then, we m... |
I am using the lme4 package to create a linear mixed effects model that accounts for repeated measures.
Data
colony_area_and_cover_code_data <- structure(list(TimeStep = structure(c(3L, 3L, 4L, 4L, 4L, 4L,
4L, 4L, 4L, 4L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 6L, 6L, 6L,
6L, 6L, 6L, 6L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 7L, ... |
I've got two models, the first model is my original model:
# Order Original
model_order_comparison = Energy ~ log(NonFat) + log(totmass)
glm_order <- glm(model_order_comparison, family=Gamma(link="log"), data=energy)
anova(glm_order , test="F")
The second model has the parameters in reverse order. Why does this matte... |
Say we have a null hypothesis, $H_0$ that there is no difference in the proportions between two arms of an experiment. You power the test to alpha and beta levels such that your $H_1$ MDE is 1% relative.
After the test, we fail to reject the null. We find only a 0.1% difference between treatment and control and our p v... |
I have multiple IVs in my moderated regression model, but I want to look at the specific interactions with each of the IVs. Is this possible? I did run the regressions separately but because I have so many IVs, I have to use a Bonferroni correction which pushes my testing of sig. really low.
Any help would be great.
Th... |
I'm running a cox regression to test the effect of different variables on crime.
There's one independent variable of interest (X), for which I hypothesize a negative relationship with crime (i.e., HR<1). This is usually what I get, also when I include several control variables.
However, when I insert two specific indep... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.