Tag Info

New answers tagged

0

If you only need an estimate of the density function as opposed to estimates and standard errors for the coefficients of a specified model structure, then obtaining a kernel density estimate might be all you need. (* Define distribution *) sas[\[Mu]_, \[Sigma]_, skew_, kurt_] := ProbabilityDistribution[ ((1 + ((z - \[Mu])/\[Sigma])^2)^(-(1/2)) kurt Cosh[ ...


1

I rewrote quite a few things... manually specifying the mixture, and setting very low iteration and precision goals because it hangs for what seems like an eternity. Importantly I also specified assumptions on the distribution: sas[\[Mu]_, \[Sigma]_, skew_, kurt_, z_] := ((1 + ((z - \[Mu])/\[Sigma])^2)^(-(1/2)) kurt Cosh[ kurt ArcSinh[(z - ...


5

I've spotted three issues with your approach and posted code: Spectral clustering uses the eigenvectors associated with the $k$ smallest eigenvalues of the Laplacian, but your code is selecting those associated with the $k$ largest eigenvalues. You need to Transpose your Kvecs prior to passing them to ClusteringComponents. As currently written, you're ...


0

It seems there is no ready way to read in this mixed type data. I used the following script to do it, can you take a look to help improve it? The code itself has been tested working, but not quite in the flow of mathematica. f = OpenRead["D:\Code_Develop\data_mathematica.cvs"]; cc = ReadList[f, String]; data1 = StringSplit[cc, ","]; ccm = data1; nn = ...


4

Sjoerd's approach using SARIMAProcess and TimeSeriesModelFit, in particular the last portion with in which you test SARIMA models of differing orders and observe which models are particularly favoured by the AIC, is certainly a valid approach. However, since you asked about periodograms and other spectral methods in your question, I thought I'd give an ...


4

First, paste your two columns of data copied from Google docs in Mathematica: data = ImportString["Day\tTraffic 1/12/2014\t3 2/12/2014\t15 . . . 5/5/2015\t109 6/5/2015\t282", "TSV"] // Rest; Then convert the few 14s and 15s mingled between the 2014s and 2015s to full years, and convert to a TimeSeries: dataTS = MapAt[ ...


3

There is a problem with your initial velocity: Hmax = Vo^2*Sin[phi Degree]^2/(2*9.8) (*13.9274*) With that initial Velocity, you can only reach 13.9 meters (far from the 25+ from your data), and that's without drag. So you can't fit anything really. Maybe the velocity is not well measured. What you could do is fit Cdrag and Vo. Using part of Mariusz's ...


1

OK, I'm able to give an incomplete answer now.I can't fit but.. Values for all constants are correct? You must have made ​​a mistake somewhere. Cdrag = 0.13952; g = 9.80665; M = 0.04593; R = 0.04267/2; Vo = 48.54; \[Phi] = 19.9; \[Rho] = 1.2041; A = \[Pi] R^2; k = 1/2 \[Rho] A Cdrag; {xsol, ysol} = NDSolveValue[{x''[t] == -(k/M)*(x'[t])^2, y''[t] == ...


1

Here's an answer to the question in the comments below OP: grid={{{{0, 1, 2}, {0, 1, 3}}, {{0, 2, 2}, {0, 2, 3}}}, {{{1, 1, 2}, {1, 1, 3}}, {{1, 2, 2}, {1, 2, 3}}}} A 2x2x2 list of 3-component vectors. If I understood correctly, pick out, for example, all such vectors, that have 0 as their first component. I am inclined to take a pattern-matching ...


2

Pick[#[[All, {1, 3}]], #[[All, 2]], 1] & @@@ grid (* {{{0, 2}, {0, 3}}, {{1, 2}, {1, 3}}} *) or (Select[#, #[[2]] == 1 &] & @@@ grid)[[All, All , {1, 3}]] (* {{{0, 2}, {0, 3}}, {{1, 2}, {1, 3}}} *) or Cases[grid, m : {{_, 1, _} ..} :> m[[All, {1, 3}]], {2}] (* {{{0, 2}, {0, 3}}, {{1, 2}, {1, 3}}} *) Update: You can also turn the ...


3

Have a look at the documentation for CSV. The first issue you have is that your file extension is .txt so Mma imports it as text file instead of a CSV file. Your second issue is that "Table" is not a supported element for either CSV or TXT so I think it is just being ignored. Even though your file does not have the .csv file type you can still tell Mma ...


4

DD[a_, b_, c_, μ_, ν_, σ_, τ_] = MixtureDistribution[{a, b, c, a, b, c}, {NormalDistribution[-μ, τ], NormalDistribution[-ν, σ], NormalDistribution[-μ - ν, σ + τ], NormalDistribution[μ, τ], NormalDistribution[ν, σ], NormalDistribution[μ + ν, σ + τ]}]; tests = {AndersonDarlingTest, CramerVonMisesTest, ...


3

imp = Import["file.csv"] (* fake data *) scores = imp[[Join @@ Range[{5, 6}, Length@imp, 12], {3, 7}]]; MFscores = GatherBy[scores, First] {{{"Cayuga ISD", 494}, {"Cayuga ISD", 489}}, {{"Elkhart ISD", 513}, {"Elkhart ISD", 455}}, {{"Westwood ISD", 519}, {"Westwood ISD", 451}}, {{"LaPoynor ISD", ""}, {"LaPoynor ISD", 451}}} You ...


4

Import the data and chose the columns that contain relevant information: In: data = Import["file.csv"]〚All, {1, 3, 7}〛 Out: {{"Female", "A", 1}, {"x", "A", 2}, {"Male", "A", 3}, {"y", "B", 4}, {"Female", "B", 5}, {"Male", "B", 6}, {"Female","C",7}, {"Male", "C", Null}} Select those entries that start with "Female" or "Male" and wich also have a ...


0

If n is a list containing the sample sizes (all elements equaling 50 in your case) for a binomial variable, then you can account for potentially varying sample sizes by including the Weight option in the following manner: Weights -> 1/Sqrt[n] This could be made much more explicit in the documentation. A more complete example might be model = ...


1

You can still use the list of data, that you plotted. You just need to Select those. (x, y) pairs you are interested in. For example: Select[plotData, MemberQ[xValues, #[[1]] ]& ] To obtain the plot data, you can use Part on the ListPlot. plotData=ListPlot[data][[1]]


1

Perhaps this example could be helpful llp = ListLinePlot[ Quantity[{0, 3, 6, 8, 10, 11, 11, 16, 20, 22}, "Centimeters"], AxesLabel -> Automatic]; pts = Cases[llp, Line[x__] :> x, -1] lp = ListPlot[pts, Joined -> True]; Grid[{{"Plot", "Replot"}, {llp, lp}}] Extracted points: {{{1., 0.}, {2., 3.}, {3., 6.}, {4., 8.}, {5., 10.}, {6., 11.}, ...


6

Pure GammaDistribution does not seem at all like a good fit even visually. You need probably a MixtureDistribution. You could BTW skip NonlinearModelFit and start playing with FindDistributionParameters. But I think you are better of trying out latest WL function FindDistribution. In automated regime it finds almost what you need: dis = ...



Top 50 recent answers are included